lecsicon cymraeg bangor enghreifftiau
1.0.0
This codebase demonstrates what can be developed with Bangor University's Welsh Lescicon.
It is also of interest to anyone who wants to learn coding (Python) and/or learn Welsh or to develop anything new for the Welsh language.
There are four main example script scripts:
spell checker
morphology
a lemmatist
Welsh Wordle game
lecsicon-cymraeg-bangor-enghreifftiau> python3 .spellchecker.py Llwytho'r lecsicon i lawr.. 100% [..........................................................................] 4415891 / 4415891 Llwytho'r geirfa... Rhowch eiriau i wirio sillafu > llwyddo True ['ll', 'w', 'y', 'dd', 'o'] > llywddo False >
lecsicon-cymraeg-bangor-enghreifftiau> python3 .morphology.py Llwytho'r geirfa... Rhowch eiriau lemma i fewn i weld ei bob ffurf a rhediad.. > coch coch ADJ coch Info:{'Degree': 'Pos'} coch ADJ cochach Info:{'Degree': 'Cmp'} coch ADJ cochaf Info:{'Degree': 'Sup'} coch ADJ coched Info:{'Degree': 'Equ'} coch ADJ choch Info:{'Degree': 'Pos', 'Mutation': 'AM'} coch ADJ chochach Info:{'Degree': 'Cmp', 'Mutation': 'AM'} coch ADJ chochaf Info:{'Degree': 'Sup', 'Mutation': 'AM'} coch ADJ choched Info:{'Degree': 'Equ', 'Mutation': 'AM'} coch ADJ goch Info:{'Degree': 'Pos', 'Mutation': 'SM'} coch ADJ gochach Info:{'Degree': 'Cmp', 'Mutation': 'SM'} coch ADJ gochaf Info:{'Degree': 'Sup', 'Mutation': 'SM'} coch ADJ goched Info:{'Degree': 'Equ', 'Mutation': 'SM'} coch ADJ nghoch Info:{'Degree': 'Pos', 'Mutation': 'NM'} coch ADJ nghochach Info:{'Degree': 'Cmp', 'Mutation': 'NM'}
lecsicon-cymraeg-bangor-enghreifftiau> python3 .lemmatizer.py Llwytho'r geirfa... Rhowch eiriau i'w lemmateiddio > clo ('clo', 'NOUN', {'Gender': 'Masc', 'Number': 'Sing'}) ('cloi', 'VERB', {'Mood': 'Imp', 'Number': 'Sing', 'Person': '2'}) ('cloi', 'VERB', {'Mood': 'Ind', 'Number': 'Sing', 'Person': '3', 'Tense': 'Fut'}) ('cloi', 'VERB', {'Mood': 'Ind', 'Number': 'Sing', 'Person': '3', 'Tense': 'Pres'})
termcolor
will need to be installed first before running the Wordle game script.
The game uses a list of the most frequent words in the Welsh language in order to offer easier 5 letter words. Although the script can be modified to make it harder or easier, as well as changing the number of letters. The digraphs of the Welsh alphabet are used (ie 'ch', 'll')