Modify example output in README.md

Updated example output to show only the first two tokens.
This commit is contained in:
Kiyarash Fazeli 2026-08-10 10:48:38 +03:30 committed by GitHub
parent b20380f97f
commit 8c82010550
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -11,8 +11,8 @@ pip install https://huggingface.co/Phazel/fa_core_news_sm/resolve/main/fa_core_n
>>> nlp = spacy.load("fa_core_news_sm") >>> nlp = spacy.load("fa_core_news_sm")
>>> doc = nlp("محمدرضا شجریان در مشهد به دنیا آمد.") >>> doc = nlp("محمدرضا شجریان در مشهد به دنیا آمد.")
>>> [(t.text, t.pos_, t.lemma_, t.dep_) for t in doc][:3] >>> [(t.text, t.pos_, t.lemma_, t.dep_) for t in doc][:2]
[('محمدرضا', 'PROPN', 'محمدرضا', 'nsubj'), ('شجریان', 'PROPN', 'شجریان', 'flat:name'), ...] [('محمدرضا', 'PROPN', 'محمدرضا', 'nsubj'), ('شجریان', 'PROPN', 'شجریان', 'flat:name')]
>>> doc.ents >>> doc.ents
(محمدرضا شجریان, مشهد) (محمدرضا شجریان, مشهد)