Skip to content
Snippets Groups Projects
Commit ee3c0efd authored by Arkadiusz Janz's avatar Arkadiusz Janz
Browse files

Update README.md

parent e7c8d86b
No related branches found
No related tags found
No related merge requests found
......@@ -106,10 +106,27 @@ for sentence in it:
Token manipulation
==================
1. Get Part-of-Speech (simple)
1. Get Part-of-Speech (simple, returns complete <ctag>)
```python
tagset = cclutils.get_tagset('nkjp')
...
pos = get_pos(token, tagset)
>>> tagset = cclutils.get_tagset('nkjp')
>>> pos = get_pos(token, tagset)
subst:pl:inst:f
```
2. Get Part-of-Speech (main_only, returns only the main part of <ctag>)
```python
>>> tagset = cclutils.get_tagset('nkjp')
>>> pos = get_pos(token, tagset, main_only=True)
subst
```
3. Get coarse-grained PoS
```python
>>> tagset = cclutils.get_tagset('nkjp')
>>> pos = get_coarse_pos(token, tagset, main_only=True)
noun
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment