Skip to content

Commit

Permalink
Merge pull request #9 from amir-zeldes/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
amir-zeldes authored Aug 19, 2021
2 parents 422bce8 + 8f0420e commit 2830897
Show file tree
Hide file tree
Showing 5 changed files with 299 additions and 287 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ Recall: 0.967103694874851
F-Score: 0.9716201652496708
```

Scores on Hebrew Wiki5K (out-of-domain, with BERT):

```
Perfect word forms: 0.9907224634820371
Precision: 0.9851075565361279
Recall: 0.9845644983461963
F-Score: 0.9848359525778881
```

Prague Arabic Dependency Treebank (UD_Arabic-PADT, currently without BERT):

```
Expand Down
3 changes: 2 additions & 1 deletion rftokenizer/flair_pos_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def __init__(self, train=False, morph=False, seg=False):
model_dir = script_dir + "models" + os.sep
if not os.path.exists(model_dir + lang_prefix + ".seg"):
sys.stderr.write("! Model file " + model_dir + lang_prefix + ".seg not found\n")
sys.stderr.write("! Attempting to download it...")
sys.stderr.write("! Attempting to download it... (this could take a while)\n")
url = "https://corpling.uis.georgetown.edu/amir/download/heb_models_v2/" + lang_prefix + ".seg"
urlretrieve(url, model_dir + lang_prefix + ".seg")
sys.stderr.write("! Done!\n")
self.model = SequenceTagger.load(model_dir + lang_prefix + ".seg")
else:
self.model = SequenceTagger.load(model_dir + lang_prefix + ".flair")
Expand Down
Loading

0 comments on commit 2830897

Please sign in to comment.