Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive_shell_NER.ipynb 수정 #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

whitepurple
Copy link

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

Interactive_shell_NER.ipynb의 DecoderFromNamedEntitySequence를 사용하던 중

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

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

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

@@ -72,69 +39,65 @@
" self.tokenizer = tokenizer\n",
" 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
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.

None yet

1 participant