-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Début de solution pour les mots composés (Ref #19). A améliorer.
Modification temporaire du tokenizer : utilisation de spacy.matcher et nlp.add_pipe() pour lier les mots séparés par un - ainsi que une liste de mots avec des espaces (pour l'instant seulement "intelligence artificielle") Il va falloir trouver comment sauvegarder ces modifications puisque nlp.to_disk('mon_modele') ne marche pas avec la méthode actuelle.
- Loading branch information
1 parent
a17fc71
commit a54f585
Showing
3 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
resolution_coreferences_pronominales/tests/test-pronoms-et-mots-composes.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import sys | ||
import spacy | ||
import fr_core_news_sm | ||
sys.path.append(".") | ||
from resolution_coreferences_pronominales.coreferences import analyses_texte | ||
|
||
phrase = u'Aujourd\'hui Volodia est tombé car Julien a crié. Il est méchant celui-là. L\'intelligence artificielle ' \ | ||
u'est passionnante.' | ||
nlp = analyses_texte.nlp_loader() | ||
doc = nlp(phrase) | ||
print([token.text for token in doc]) |