Update README.md
Browse files
README.md
CHANGED
@@ -36,7 +36,7 @@ To use the IsaNLP RST Parser with Hugging Face, follow these steps:
|
|
36 |
You will need the `isanlp` library, which is available via pip:
|
37 |
|
38 |
```bash
|
39 |
-
pip install
|
40 |
```
|
41 |
|
42 |
2. **Example code for parsing RST:**
|
@@ -44,13 +44,13 @@ To use the IsaNLP RST Parser with Hugging Face, follow these steps:
|
|
44 |
The following Python code demonstrates how to run a specific version of the parser using the Hugging Face model:
|
45 |
|
46 |
```python
|
47 |
-
from
|
48 |
|
49 |
# Define the version of the model you want to use
|
50 |
version = 'gumrrg' # from {'gumrrg', 'rstdt', 'rstreebank'}
|
51 |
|
52 |
# Initialize the parser with the desired version
|
53 |
-
parser =
|
54 |
|
55 |
# Example text for parsing
|
56 |
text = """
|
|
|
36 |
You will need the `isanlp` library, which is available via pip:
|
37 |
|
38 |
```bash
|
39 |
+
pip install isanlp_rst
|
40 |
```
|
41 |
|
42 |
2. **Example code for parsing RST:**
|
|
|
44 |
The following Python code demonstrates how to run a specific version of the parser using the Hugging Face model:
|
45 |
|
46 |
```python
|
47 |
+
from isanlp_rst.parser import Parser
|
48 |
|
49 |
# Define the version of the model you want to use
|
50 |
version = 'gumrrg' # from {'gumrrg', 'rstdt', 'rstreebank'}
|
51 |
|
52 |
# Initialize the parser with the desired version
|
53 |
+
parser = Parser(hf_model_name='tchewik/isanlp_rst_v3', hf_model_version=version, cuda_device=0)
|
54 |
|
55 |
# Example text for parsing
|
56 |
text = """
|