Skip to content

Commit

Permalink
update 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Risha37 committed Nov 24, 2022
1 parent b61d51e commit 361f2e6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/scripts/Postagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,31 @@ def tag(self):
elif tokens[i][j].startswith(('ال', 'كال', 'فال', 'بال', 'وال')) or tokens[i][j].endswith(('ة', 'ائي', 'ائك', 'ائه', 'اؤك', 'اؤه', 'اءك', 'اءه', 'اء')):
tagsList.append({tokens[i][j]: "Noun"})
# V.1
elif (tokens[i][j].startswith(('است'))) or (tokens[i][j].startswith(('ت', 'ي', 'سأ', 'سي', 'ست', 'سن')) and tokens[i][j].endswith(('ون', 'وا', 'ين'))):
elif (tokens[i][j].startswith(('است', 'يست', 'نست', 'تست'))) or (tokens[i][j].startswith(('ت', 'ي', 'سأ', 'سي', 'ست', 'سن', 'تست')) and tokens[i][j].endswith(('ون', 'وا', 'ين'))):
tagsList.append({tokens[i][j]: "Verb"})


# N.2
elif re.search(asmaa3, tokens[i][j]):
tagsList.append({tokens[i][j]: "Noun"})
# V.2
elif re.search(afaal3, tokens[i][j]):
elif re.search(afaal, tokens[i][j]):
tagsList.append({tokens[i][j]: "Verb"})
# N.2
elif re.search(asmaa, tokens[i][j]):
tagsList.append({tokens[i][j]: "Noun"})


# V.3
elif re.search(afaal2, tokens[i][j]):
tagsList.append({tokens[i][j]: "Verb"})
# N.3
elif re.search(asmaa2, tokens[i][j]):
elif re.search(asmaa3, tokens[i][j]):
tagsList.append({tokens[i][j]: "Noun"})
# V.3
elif re.search(afaal3, tokens[i][j]):
tagsList.append({tokens[i][j]: "Verb"})


# V.4
elif re.search(afaal, tokens[i][j]):
elif re.search(afaal2, tokens[i][j]):
tagsList.append({tokens[i][j]: "Verb"})
# N.4
elif re.search(asmaa, tokens[i][j]):
elif re.search(asmaa2, tokens[i][j]):
tagsList.append({tokens[i][j]: "Noun"})


Expand Down

0 comments on commit 361f2e6

Please sign in to comment.