Find datives in Unimorph
Doesn't work; Unimorph for Irish is basically useless
Unimorph's Irish extraction from Wiktionary is basically useless: nouns don't include gender, they extract contexts instead of forms, and only extract the first of multiple contexts; their tagset is bizarre and incomplete regarding Irish. About the only thing it's even potentially good for is finding the dative forms of nouns (without doing a full wiktionary extraction).
with open('../input/unimorph-gle/gle', 'r') as crap:
for line in crap.readlines():
if line.strip() == '':
continue
parts = line.split('\t')
if len(parts) < 3:
print(f'Junk: <{parts[0]}> <{parts[1]}>')
if parts[2] == 'N;DAT;SG' and parts[0] != parts[1]:
print(f'{parts[0]}\t{parts[1]}')
elif parts[2] == 'N;DAT;SG;DEF':
form = parts[2].replace('leis an ', '')
if len(form) > 3 and form[0:2] == 'bhf' or form[0:1] == 'n-':
if parts[0] != form[2:]:
print(f'{parts[0]}\t{form[2:]}')
elif len(form) > 2 and form[0:1] in ['mb', 'gc', 'nd', 'ng', 'bp', 'dt']:
if parts[0] != form[1:]:
print(f'{parts[0]}\t{form[1:]}')
else:
continue