2016-06-04 1 views
1

안녕하세요. stanfordNERenglish.muc.7class.distsim.crf.ser.gz는 위치, 사람, 조직, 금, 퍼센트, 날짜, 시간 등 7 가지 클래스를 분류하는 데 도움이됩니다. 돈을, 날짜, 시간, 위치, 학위 등 7 명 클래스의 텍스트를 분류하는 ... 모델 nlp 라이브러리를 사용자 정의하는 방법을 알려주십시오 스탠포드 nlp/gate/open nlpnlp를 사용하여 NER 모델을 사용자 정의하는 방법

+0

태그를 지정하려면 학습 데이터가 필요합니다. 또한 FAQ를 확인하십시오. http://nlp.stanford.edu/software/crf-faq.shtml#a –

답변

1

<START:person> Pierre Vinken <END> , 61 years old , will join the board as a nonexecutive director Nov. 29 . 
Mr . <START:person> Vinken <END> is chairman of Elsevier N.V. , the Dutch publishing group . 

이러한 태그는 찾으려는 모두 다른 엔티티 추가했습니다 무엇 :이 documentation에 주어진, 당신의 훈련 데이터를 생성, opennlp 사용합니다. 및 설명서에 제공된 교육 API 또는 CLI를 사용하여 모델을 만드십시오.

교육 세트에 약 15000 개의 라인이 있으면 좋은 결과를 기대할 수 있습니다!

0

OpenNLP에서 아래 단계를 사용하여 맞춤형 NER 모델을 만들 수 있습니다.

먼저 주어진 형식 (<START:entity-name> .....<END>)으로 데이터를 학습해야합니다. 약 NER 모델을 만들고 싶다고합시다.

예 :

<START:medicine> Augmentin-Duo <END> is a penicillin antibiotic that contains two medicines - 
<START:medicine> amoxicillin trihydrate <END> and <START:medicine> potassium clavulanate <END>. They work together to kill certain types of bacteria and are used to treat certain types of bacterial infections 

훈련 데이터가 더 나은 결과를 얻을 적어도 15000 개 문장이 있어야합니다 그래서 이런 일이 될 것입니다.

원하는 모델 이름, 데이터 파일 경로와 함께 호출되는 TokenNameFinderModel 클래스의 TokenNameFinderModel 클래스를 사용하십시오.

당신이 사용하는 명령 줄 등을 만들 수 있습니다 :

$opennlp TokenNameFinderTrainer -model en-ner-drugs.bin -lang en -data drugsDetails.txt -encoding UTF-8 

이 같은 사용하여 자바를 수행하려면, 당신은이 글을 참조 할 수 있습니다 : Writing a custom NameFinder model in OpenNLP.

관련 문제