Skip to content

Commit

Permalink
Update app/runnable.py
Browse files Browse the repository at this point in the history
Co-authored-by: SEONGILKIM <shiroed1211@gmail.com>
  • Loading branch information
ekzm8523 and kshired authored Oct 6, 2022
1 parent 8f6b30a commit 01bfc0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def synchronize_keywords(self, input_data: KeywordGradingRequest) -> None:
self.create_problem(input_data)

def get_tokenized_answer(self, user_answer: str) -> List[str]:
user_answer = re.sub(r"[^\uAC00-\uD7A3a-zA-Z\s]", "", user_answer)
special_char_pattern = r"[^\uAC00-\uD7A3a-zA-Z\s]"
user_answer = re.sub(special_char_pattern, "", user_answer)
tokenized_answers = tuple(
word for word, _ in self.tokenizer.pos(user_answer) if word not in self.stopwords and len(word) > 1
)
Expand Down

0 comments on commit 01bfc0e

Please sign in to comment.