Skip to content

Commit

Permalink
Merge c789bc5 into 52c4908
Browse files Browse the repository at this point in the history
  • Loading branch information
ophelielacroix committed Nov 18, 2021
2 parents 52c4908 + c789bc5 commit 7cf4a06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion danlp/datasets/unimorph.py
Expand Up @@ -27,7 +27,7 @@ def __init__(self, cache_dir=DEFAULT_CACHE_DIR, verbose=False):
self.database = pd.read_csv(self.file_path,
sep='\t',
names=['lemma', 'form', 'feats'],
encoding='unicode_escape',
encoding='utf-8',
usecols=[0,1,2],
dtype={'lemma':str, 'form':str, 'feats':str})

Expand Down
2 changes: 1 addition & 1 deletion tests/test_datasets.py
Expand Up @@ -201,7 +201,7 @@ def test_unimorph(self):
self.assertEqual(unimorph.get_inflections('svar'), ['svaredes', 'svarede', 'svarer', 'svares', 'svare', 'svar'])
self.assertEqual(unimorph.get_inflections('trolde', pos='V'), ['troldedes', 'troldede', 'trolder', 'troldes', 'trolde', 'trold'])
self.assertEqual(unimorph.get_inflections('trolde', pos='N', with_features=True)[0], {'lemma': 'trold', 'form': 'troldene', 'feats': 'N;DEF;NOM;PL', 'pos': 'N'})
self.assertEqual(unimorph.get_lemmas('papiret', with_features=True), [{'lemma': 'papir', 'form': 'papiret', 'feats': 'N;DEF;NOM;SG', 'pos': 'N'}])
self.assertEqual(unimorph.get_lemmas('nytårsaftens', with_features=True), [{'lemma': 'nytårsaften', 'form': 'nytårsaftens', 'feats': 'N;INDF;GEN;SG', 'pos': 'N'}])

class TestDanedDatasets(unittest.TestCase):
def test_daned(self):
Expand Down

0 comments on commit 7cf4a06

Please sign in to comment.