Skip to content

Interactive_shell_NER.ipynb 수정#11

Open
whitepurple wants to merge 1 commit into
eagle705:masterfrom
whitepurple:master
Open

Interactive_shell_NER.ipynb 수정#11
whitepurple wants to merge 1 commit into
eagle705:masterfrom
whitepurple:master

Conversation

@whitepurple
Copy link
Copy Markdown

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

Interactive_shell_NER.ipynb의 DecoderFromNamedEntitySequence를 사용하던 중

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

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

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

" self.index_to_ner = index_to_ner\n",
"\n",
" def __call__(self, list_of_input_ids, list_of_pred_ids):\n",
" def __call__(self, list_of_input_ids, list_of_pred_ids, line=0):\n",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분은 제 실수로 들어갔습니다. 수정하지 않으셔도 됩니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant