Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions backend/app/analysis/parts_of_speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,13 @@ def get_parts_of_speech_tags(text):
'noun': ['NN', 'NNS', 'NNP', 'NNPS'],
'verb': ['VB', 'VBD', 'VBG', 'VBN', 'VBP', 'VBZ'],
'adverb': ['RB', 'RBR', 'RBS'],
'adjective': ['JJ', 'JJR', 'JJS']
'adjective': ['JJ', 'JJR', 'JJS'],
'adposition': ['IN', 'TO', 'PRT'],
'conjunctive': ['CC', 'CONJ'],
'pronouns': ['PRP', 'PRON'],
'determiner': ['DT', 'DET'],
'numeral': ['NUM'],
'other': ['X']
}


Expand Down Expand Up @@ -262,7 +268,7 @@ def punct_in_word(word):
"""
Checks if there are punctuations in the word
"""
quotes = ["“", '"', "'", "’", ".", "?", "!"]
quotes = ["“", '"', "'", "’", ".", "?", "!", ":", ";", "-", ","]
for quote in quotes:
if quote in word:
return True
Expand Down