[英]create pos tagged corpus with NLTK
我想用 NLTK 構建 pos 標記的語料庫。 這樣我就可以基於它訓練我的模型。
到目前為止,我已經參考了許多來源,但每個來源都只是解釋如何閱讀您的標記語料庫以及閱讀單詞、句子等。以下是我嘗試過的一段代碼:
from nltk.corpus.reader import TaggedCorpusReader
reader = TaggedCorpusReader('/home/abc/nltk_data/', 'pos_tagged.pos')
reader.words()
reader.tagged_words()
reader.sents()
我想將我的語料庫包含在home/nltk_data/corpora/
文件夾中,以便我可以導入我創建的語料庫。 請指導我。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.