Created
May 9, 2020 16:38
-
-
Save diyclassics/e82e4ebfe0ab8b7c899f50ff4b03d0eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```python | |
from pycollatinus import Lemmatiseur | |
import pprint | |
tagger = Lemmatiseur() | |
``` | |
```python | |
lemmas = tagger.lemmatise_multiple('ne') | |
lemmas_set = sorted(set([lemma['lemma'] for lemma in lemmas[0]])) | |
print(lemmas_set) | |
``` | |
['ne', 'neo', 'nes'] | |
```python | |
pp = pprint.PrettyPrinter(sort_dicts=False) | |
pp.pprint(lemmas) | |
``` | |
[[{'form': 'ne', | |
'lemma': 'neo', | |
'morph': '2ème singulier impératif présent actif', | |
'radical': 'n', | |
'desinence': 'e'}, | |
{'form': 'ne', | |
'lemma': 'nes', | |
'morph': 'vocatif singulier', | |
'radical': 'n', | |
'desinence': 'e'}, | |
{'form': 'ne', | |
'lemma': 'nes', | |
'morph': 'ablatif singulier', | |
'radical': 'n', | |
'desinence': 'e'}, | |
{'form': 'ne', 'lemma': 'ne', 'morph': '-', 'radical': 'ne', 'desinence': ''}, | |
{'form': 'ne', 'lemma': 'ne', 'morph': '-', 'radical': 'ne', 'desinence': ''}, | |
{'form': 'ne', | |
'lemma': 'ne', | |
'morph': 'positif', | |
'radical': 'ne', | |
'desinence': ''}]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment