스페인어에 대한 타거 성능 comparisson을 만들려고합니다. 현재 스크립트는 this의 수정 된 버전입니다. althoug와 비슷한 결과를 가진 다른 버전을 시도했습니다.NLTK 스페인어 타거스 결과가 정말 안좋은가요?
저는 cess_esp corpus를 사용하고 있으며 태그 화 된 문장을 사용하여 각 태그 작성자를 교육하기 위해이 자료에 대한 Unigram, Bigram, Trigram 및 Brill 태그 작성기를 작성했습니다.
저는 Bigram, Trigram taggers의 성능에 대해 우려하고 있습니다. 결과에서 AT 모두 작동하지 않는 것 같습니다. 이제 음절과 괘는 방법입니다 표시된 링크로 훈련되고
*************** START TAGGING FOR LINE 6 ****************************************************************************************************************************************
Current line contents before tagging-> mejor ve a la sucursal de Juan Pablo II es la que menos gente tiene y no te tardas nada
Unigram tagger-> [('@yadimota', None), ('@ContactoBanamex', None), ('mejor', 'aq0cs0'), ('ve', 'vmip3s0'), ('a', 'sps00'), ('la', 'da0fs0'), ('sucursal', 'ncfs000'), ('de', 'sps00'), ('Juan', 'np0000p'), ('Pablo', None), ('II', None), ('es', 'vsip3s0'), ('la', 'da0fs0'), ('que', 'pr0cn000'), ('menos', 'rg'), ('gente', 'ncfs000'), ('tiene', 'vmip3s0'), ('y', 'cc'), ('no', 'rn'), ('te', 'pp2cs000'), ('tardas', None), ('nada', 'pi0cs000')]
Bigram tagger-> [('@yadimota', None), ('@ContactoBanamex', None), ('mejor', None), ('ve', None), ('a', None), ('la', None), ('sucursal', None), ('de', None), ('Juan', None), ('Pablo', None), ('II', None), ('es', None), ('la', None), ('que', None), ('menos', None), ('gente', None), ('tiene', None), ('y', None), ('no', None), ('te', None), ('tardas', None), ('nada', None)]
Trigram tagger-> [('@yadimota', None), ('@ContactoBanamex', None), ('mejor', None), ('ve', None), ('a', None), ('la', None), ('sucursal', None), ('de', None), ('Juan', None), ('Pablo', None), ('II', None), ('es', None), ('la', None), ('que', None), ('menos', None), ('gente', None), ('tiene', None), ('y', None), ('no', None), ('te', None), ('tardas', None), ('nada', None)]
****************************************************************************************************************************************
*************** START TAGGING FOR LINE 7 ****************************************************************************************************************************************
Current line contents before tagging-> He levantado ya varios reporte pero no resuelven nada
Unigram tagger-> [('He', 'vaip1s0'), ('levantado', 'vmp00sm'), ('ya', 'rg'), ('varios', 'di0mp0'), ('reporte', 'vmsp1s0'), ('pero', 'cc'), ('no', 'rn'), ('resuelven', None), ('nada', 'pi0cs000')]
Bigram tagger-> [('He', None), ('levantado', None), ('ya', None), ('varios', None), ('reporte', None), ('pero', None), ('no', None), ('resuelven', None), ('nada', None)]
Trigram tagger-> [('He', None), ('levantado', None), ('ya', None), ('varios', None), ('reporte', None), ('pero', None), ('no', None), ('resuelven', None), ('nada', None)]
*************** START TAGGING FOR LINE 8 ****************************************************************************************************************************************
Current line contents before tagging-> Es lamentable el servicio que brindan
Unigram tagger-> [('@ContactoBanamex', None), ('Es', 'vsip3s0'), ('lamentable', 'aq0cs0'), ('el', 'da0ms0'), ('servicio', 'ncms000'), ('que', 'pr0cn000'), ('brindan', None)]
Bigram tagger-> [('@ContactoBanamex', None), ('Es', None), ('lamentable', None), ('el', None), ('servicio', None), ('que', None), ('brindan', None)]
Trigram tagger-> [('@ContactoBanamex', None), ('Es', None), ('lamentable', None), ('el', None), ('servicio', None), ('que', None), ('brindan', None)]
, 더 정직 식으로에 도시 된 바와 같이
: 예를 들어, 여기에 내 스크립트의 일부 출력 NLTK 도서 :
from nltk.corpus import cess_esp as cess
from nltk import BigramTagger as bt
from nltk import TrigramTagger as tt
cess_sents = cess.tagged_sents()
# Training BigramTagger.
bi_tag = bt(cess_sents)
#Training TrigramTagger
tri_tag = tt(cess_sents)
내가 여기에 뭔가 빠진다면 어떤 생각이라도 있니? bigram과 trigram이 unigram보다 잘 작동하지 않아야합니까? 나는 bigram adn trigram을 위해 항상 backoff tagger를 사용해야합니까?
감사합니다. 알레한드로
안녕하세요 Alvas은, 예,를 작성 주셔서 감사합니다. unigram과 bigram을 사용한다면 스파게티 타거라는 이유는 무엇입니까? http://nltk.googlecode.com/svn/trunk/doc/howto/tag.html 및 http://www.nltk.org/book/ch05.html에서 링크를 따라갔습니다. 실제로 나는 unigram을위한 bigram backoff tagger와 trigram과 결과를위한 bigram backoff tagger를 포함하도록 스크립트를 수정했습니다. 나는 또한 트레이너로 unigram과 브릴 태거를 사용하고 작동하는 것. 나는 Freeling과 TreeTagger를 보았습니다. 그러나 파이썬이 아니기 때문에 파이썬에서 Freeling을위한 래퍼를 가지고 있다면 그것을 버립니다! – AlejandroVK
코드를 제대로 살펴 보면 피클과 mwe 태그가 포함 된 트릭이 있습니다. NLTK를 사용하여 더 확장 성이 좋은 태그 작성기에 대한 일종의 무료 튜토리얼 일뿐입니다. 몇 가지 무료 래퍼 (https://www.google.com/search?q=freeling+python)가 있습니다.나는 자유로운 경우에 하나를 쓰겠습니다. =) – alvas
안녕하세요, 포트가있는 것 같습니다. 체크 아웃 할 것입니다. http://www.ohloh.net/p/freeling-python – AlejandroVK