Showing posts with label computer cornish kernewek. Show all posts
Showing posts with label computer cornish kernewek. Show all posts

Monday, 15 August 2016

Text to speech in Cornish

The program espeak offers text to speech in a variety of languages, not yet Cornish, but I have made a bit of a hack that allows Cornish text to be spoken by it.

There is a Welsh language voice for it, and I have created a script that processes Cornish text doing a series of replaces to make it conform to Welsh spelling rules.

It would be possible to get espeak to speak Cornish directly by creating a Cornish voice for it, and I did start doing this a long time ago, but unfortunately lost this work along with my previous laptop.

The GUI launcher currently only works in Linux-compatible systems, because it launches espeak via the command-line via the Python os library. However espeak itself is also available for Windows and I will adapt the script to work on Windows dreckly.

The first quote as an mp3 file. The second is generated by pressing the "Gorhemmyn" button, and an appropriate greeting is chosen according to the system clock.



Sunday, 14 August 2016

Transliteration from Kernewek Kemmyn to Standard Written Form

The script treuslytherenna.py and its GUI frontend treuslytherennaGUI.py converts text from Kernewek Kemmyn to Standard Written Form (Main Form).

See also the brief writeup on my website, and earlier on this blog.

A couple of example sentences I use to illustrate some of its features are:

  • Yth esa gwydhenn y'n goeswik
  • Yth esa gwydhennow y'n goeswik

 There was a tree in the forest is the translation of the first sentance, and gwydhennow is the plural of the singlative gwydhenn which derives from the collective noun gwydh (trees). Gwydh would be use for a general mass of trees, gwydhenn a single tree, and gwydhennow a countable collection of individual trees.



In the left hand panel, gwydhenn becomes gwedhen showing two changes, firstly the doubled consonant -nn becomes single -n. The program will make this change for unstressed syllables, exluding those that are prefixes that have secondary stress like penn- in pennseythun and some others.
The other change is the y becoming an e as part of vocalic alternation. This occurs for y vowels that are 'half-long' in Kernewek Kemmyn, which is detected via the syllable segmentation program.
The function converty(inputsyl) in treuslytherenna.py applies this change as long as the word isn't in a list of exceptions given in datageryow.py and the syllable ends in a consonant. If the syllable ends in a vowel (e.g. ay, ey, oy diphthongs, and -ya endings where the y (which is really a semi-vowel y) has been erroneously assigned to the previous syllable) the change is not made.

If backwards segmentation is chosen, this change won't happen since gwydhenn will be segmented into ['gwy', 'dhenn'] and the y will not be changed since it is now in a syllable ending in a vowel.

The word goeswik (mutation of koeswik) becomes goswik, as the Kernewek Kemmyn oe becomes o where it is a short or half-long vowel, and oo in a syllable with a Kernewek Kemmyn long vowel.

In the right hand panel, the word gwydhennow is unchanged, because the y vowel in the first syllable is now short rather than half-long, and the -nn is in a stressed syllable so retained as a double consonant.


Saturday, 13 August 2016

An update on TaklowKernewek - Cornish language Python tools

I have been continuing a little more development on my Cornish language processing tools.

I have added recently a number of things to them, including reverse mutation, and a launcher program. In this post, I will describe a little of 'Niverow', a program to write out numbers in Cornish, 'Mutatya' - a program to generate mutated forms of words, and 'Inflektya', a program to generate inflected verb forms.

Firstly the launcher program. This is the file  TaklowKernewekLonchyer.pyw
which itself imports a couple of other scripts TaklowKernewekLonch.py and launchmodes.py which are largely based on example scripts from Programming Python 3rd edition by Mark Lutz.

Running this brings up a basic array of buttons:
Clicking on any of these buttons will bring up its own GUI window.

 Niverow

In the boxes, specify the number, and the noun, and noun plural, if you wish to include the noun. It is also necessary to tick the box next to "Usya Hanow" to do so. Tick "Hanow Benow" to indicate that it is a feminine noun, which will make the program use the feminine forms of numbers (e.g. diw in place of dew) where they are needed. Decimal numbers can be used, and this program treats them reading out one digit at a time.
If using a decimal number, the program will use the number + a + plural noun format. The plural is assumed to be the noun + -ow unless a different one is specified.
This format is also used if the number has more than three elements

Mutatya

I have mentioned mutatya.py before on this blog,  but it has a few new features including an option to use the traditional spelling forms as used in the SWF Traditional variant. These consist of using c instead of k before some vowels, and using qw- instead of kw- and wh- instead of hw-.

The other new feature is reverse mutation, taking a word and identifying what words it could originally have been. This doesn't check whether the hypothesised unmutated word actually exists, or whether the mutation is actually gramatically possible.

Traditional forms of the soft mutation c-->g, and the hard mutation gw-->qw. These would be k-->g and gw-->kw in Kernewek Kemmyn, or SWF Main Form.

The word 'garr' could either be an unmutated form, or a soft mutation of 'karr'. Likewise 'hanow' could be 'hanow', breathed mutation of 'kanow' or mixed mutation of 'ganow'.

Inflektya

This program generates inflected forms of verbs, selecting the tense in the left hand menu, the person in the next one, whether to use suffixed pronouns, and whether to expect SWF input and give SWF output (the default is Kernewek Kemmyn).
Showing the inflected forms of the regular verb 'prena' for present, preterite, and imperfect tenses.
Attempting to show the future tense of prena gives an error message, since the simple future doesn't exist for this verb.

The imperative, which doesn't exist for the impersonal, and first person forms, and is not very common except in 2nd person 'Ty' and 'Hwi' forms.
For the irregular verb 'bos' to be, the simple future is shown.
The present subjunctive of the verb 'dismygi' in Kernewek Kemmyn, and in SWF.


Friday, 15 October 2010

Skrifenn Seytek - Kernewek Jynn-amontya 5 - Writing 17 - Computer Cornish 5

Ny vynnewgh hwi kara tri jynn-diwros kottha Didn't you want to like three older motorcycles?
Yw an jynn-tenna drog? - Is the tractor bad?
Yw an ervin an yrra? - Is the turnip the freshest?
Yw an karr le? - Is the car smaller?
Yw an chi gwann? - Is the house weak?
A ny dhybren ni pasti an toemma? - Did we not used to eat the warmest pasty?
Yw an gwin an gwella? - Is the wine the best?
Yw an margh an gwettha?- Is the horse the worst?
A werth ev aval-dor heb an arghans da? - Does he sell a potato without the good money?
A wrens i gweles diwros an berra? - Did they used to see the shortest bicycle?
A wrussowgh hwi drehevel chi an gwanna? - Did you build the weakest house?
A wren ni gweles oen an kottha? - Did we used to see the oldest lamb?
My a vynn gul aga jynn-diwros byghan. - I want to make their small motorcycle.
An ervin na brenen ni. - The turnip we didn't use to buy.
Ny werthis vy arghans yn-dann hogh. - I didn't sell money under a pig.
Hi a ylla dybri pasti yn ow chi. - She used to be able to eat a pasty in my house.
My a wre ladha agas mamm berr. - I used to kill your short mother.
My a wela ow onyon. - I used to see my onion.
Ny vynn'ta prena onyon. - You don't want to buy onion.
Ny brensyn ni hy arghans. We didn't buy her money.
My a vynna kara onan bugh. - I used to want to like one cow.
Hwi a wre dha lyver. - You used to make your book.
I a wra gweles pasti heb mamm hir. - They will see a pasty without a tall mother.
Hi a brena pasti war arghans an kottha. - She used to buy a pasty on the oldest money.
Hi a vynna gweles mowes gans chi berr. - She used to want to see a girl with a short house.
I a vynna gul karr byghan. - They used to make a little car.
Hi a wel tri bugh. - She sees three cows.
Ny evis vy korev gans onyon. - I didn't drink beer with onion.
I a vynn gweles korev heb agan gwin. - They want to see beer without our wine.
Ny yv an bugh onyon byghan. - The cow doesn't drink the small onion.
Ev a wrug gweles margh heb pasti toemm. - He saw a horse without a warm pasty.
My a dhebera peswar pasti. - I used to eat four pasties.
I a welas y arghans gans an margh. - They saw his money with the horse.
Ev a allas kara karr yn agan bardhonieth. - He could like a car in our poetry
Hwi a gara arghans war chi an gwanna. - You used to like money on the weakest house.
An chi hag a brensowgh hwi. - The house that you bought.
An lyver na garons i. - The book they didn't like.
Hwi a welas agas lyver heb an chi. - You saw your book without the house.
Hwi a wra gweles peswardhek kyttrin. - You will see fourteen buses.
Ny wren vy korev. - I didn't used to make beer.
I a welas gwin heb an pasti. - They saw wine without the pasty.
Ni a vynn gweles margh war aga bugh. - We want to see a horse on their cow.
An diwros hag a brenas hi. - The bicycle that she bought.

Saturday, 5 June 2010

Skrifenn Hwetek Kernewek Jynn-amontya 4 - Writing 16 - Computer Cornish 4

Piw a bren an arghans? - Who buys the money
Piw a garas an jynn-diwros na? Who loved that bicycle
Yw an arghans byghan? - Is the money small?
Yw an korev kottha? - Is the beer older
A nyns yw an pasti koth? - Isn't the pasty old?
Yw an pasti an toemma? Is the pasty the warmest?
A welas ev peswar myrgh koth? Did he see four old horses?
A ny bren hi chi an yeynna. Didn't she buy the coldest house?
Ny yllsys jy gweles naw mowes brassa. You couldn't see nine larger girls.
A ny vynn hi gweles bugh gwann? Didn't she want to see a weak cow?
A wrug ev prena bewin an kottha? Did he buy the oldest beef?
A brensys jy trydhek bardhonieth gans an pasti yeyn? Did you buy thirteen poetries with the cold pasty?
My a wertha oen. I used to sell lamb
Hwi a wre diwros bras. You used to make a large bicycle.
Hwi a wrug kara seytek bugh. You did love seventeen cows.
Hwi a allas kara tas koth. You could love old father.
Ny dheberas ev ugens pasti. He didn't eat twenty pasties.
I a wel chi heb an karr. They see a house without the car
Ev a wrug margh yn kyttrin an lenta. He made a horse in the slowest bus
I a wre kara onyon war margh. They used to like onion on a horse.
I a vynn ladha mab gans arghans da. They want to kill a son with good money.
Ny bren hi karr heb chi. She doesn't buy a car without a house
Ny wren vy prena chi. I didn't used to buy a house
My a bren ow arghans. I buy my money.
Hi a brena dha hwedhel hir. She used to buy your long story
Hwi a wra prena agan pasti. You buy our pasty
My a wra gwertha dha vewin da. I sell your good beef.
Ny garen vy ow chi. I didn't used to like my house
Ty a welas hy maw yn-dann an bardhonieth. You saw her son under the poetry.
My a wel y vardhonieth yn-dann onyon an gwettha. I see his poetry under the worst onion.
Hi a vynnas gul korev yn y basti. She wanted to make beer in his pasty.
Ev a yll gweles oen gans aga fasti da. He can see lamb with their good pasty.
Ny werthes jy karr yn-dann dha oen. You didn't sell a car under your lamb.
Ny ylla ev gwertha ow horev. He wasn't used to be able to sell my beer.
An hwoer a werthas pymp karr. The sister sold five cars
An myrgh a wre gweles aval-dor le. The horse used to see a smaller potato
Yn pasti y prenewgh hwi an kyttrin. In a pasty you bought the bus.
Yn jynn-tenna y hwelsons i korev. In a tractor they saw their beer.
Ow hwoer a dheberas bewin toemm. My sister ate warm beer.
Agan den a vynn gweles chi an gwanna. Our man wants to see the weakest house.
Ny gar an margh bugh skav. The horse doesn't like a fast cow.
An karr hag a brensys jy. The car that you bought
An gwin na wela hi. The wine she didn't used to see.