pytorch-bert-crf-ner icon indicating copy to clipboard operation
pytorch-bert-crf-ner copied to clipboard

Interactive_shell_NER.ipynb 수정

Open whitepurple opened this issue 4 years ago • 0 comments

안녕하세요, 좋은 코드를 공유해 주셔서 감사합니다.

Interactive_shell_NER.ipynb의 DecoderFromNamedEntitySequence를 사용하던 중

  • B-tag가 연속으로 나오는 경우
  • I-tag로 문서가 끝나는 경우
  • B-tag 없이 I-tag가 나오는 경우

에 대한 예외처리를 진행하며 list_of_ner_word와 decoding_ner_sentence를 같이 parsing하였습니다.

또한 gpu사용 가능한 환경에서 실행하는 경우 모델과 데이터를 같은 device에 둘 수 있도록 하였습니다.

whitepurple avatar Nov 21 '20 19:11 whitepurple