Nanotechnology is sunny in Cornwall today

Tags:

20 Aug 2016 - MawKernewek

Using Python NLTK, it is possible to find synonyms of input words using WordNet, and then feed this into the translation memory software.

It can produce odd results since some words will have different senses that was intended in the input sentence.

When using for the sentence "It is sunny in Cornwall today.", the only sentence returning the bigram ("today", ".") is
"Morwenna yw lowen. Hy fenn-bloedh yw hedhyw. -- Morwenna is happy. Her birthday is today. : [('today', '.')]". However using WordNet to find similar words (by finding words that are hyponyms of the hypernyms of the word) bigrams ("now", ".") and ("yesterday", ".") are also found in the sentence corpus.


python wordnettest.py
Enter some text please.
It is sunny in Cornwall today.
word: It
(Synset('information_technology.n.01'), u'the branch of engineering that deals with the use of computers and telecommunications to retrieve and store and transmit information')

Hypernyms
[Synset('engineering.n.02')]
(Synset('engineering.n.02'), u'the discipline dealing with the art or science of applying scientific knowledge to practical problems')

Hyponyms of all hypernyms
[u'aeronautical_engineering', u'architectural_engineering', u'bionics', u'biotechnology', u'bioengineering', u'ergonomics', u'chemical_engineering', u'civil_engineering', u'computer_science', u'computing', u'electrical_engineering', u'EE', u'industrial_engineering', u'industrial_management', u'information_technology', u'IT', u'mechanical_engineering', u'nanotechnology', u'naval_engineering', u'nuclear_engineering', u'rocketry']




word: sunny
(Synset('cheery.s.01'), u'bright and pleasant; promoting a feeling of cheer')

Hypernyms
[]

Hyponyms of all hypernyms
[]




word: Cornwall
(Synset('cornwall.n.01'), u'a hilly county in southwestern England')

Hypernyms
[]

Hyponyms of all hypernyms
[]


word: today
(Synset('today.n.01'), u'the present time or age')
(Synset('today.n.02'), u'the day that includes the present moment (as opposed to yesterday or tomorrow)')
(Synset('nowadays.r.01'), u'in these times')
(Synset('today.r.02'), u'on this day as distinct from yesterday or tomorrow')

Hypernyms
[Synset('present.n.01'), Synset('day.n.01')]
(Synset('present.n.01'), u'the period of time that is happening now; any continuous stretch of time including the moment of speech')
(Synset('day.n.01'), u'time for Earth to make a complete rotation on its axis')

Hyponyms of all hypernyms
[u'date', u'here_and_now', u'present_moment', u'moment', u'now', u'time_being', u'nonce', u'today', u'tonight', u'date', u'day_of_the_month', u'date', u'eve', u'morrow', u'today', u'tomorrow', u'yesterday']


word: .

Hypernyms
[]

Hyponyms of all hypernyms
[]


mechanical engineering is sunny in Cornwall today.
electrical engineering is sunny in Cornwall today.
industrial management is sunny in Cornwall today.
aeronautical engineering is sunny in Cornwall today.
nuclear engineering is sunny in Cornwall today.
nanotechnology is sunny in Cornwall today.
ergonomics is sunny in Cornwall today.
chemical engineering is sunny in Cornwall today.
It is sunny in Cornwall tonight.
It is sunny in Cornwall now.
It is sunny in Cornwall eve.
It is sunny in Cornwall present moment.
It is sunny in Cornwall morrow.
EE is sunny in Cornwall today.
It is sunny in Cornwall moment.
It is sunny in Cornwall today.
rocketry is sunny in Cornwall today.
biotechnology is sunny in Cornwall today.
information technology is sunny in Cornwall today.
It is sunny in Cornwall yesterday.
architectural engineering is sunny in Cornwall today.
civil engineering is sunny in Cornwall today.
naval engineering is sunny in Cornwall today.
computing is sunny in Cornwall today.
industrial engineering is sunny in Cornwall today.
It is sunny in Cornwall day of the month.
IT is sunny in Cornwall today.
bionics is sunny in Cornwall today.
It is sunny in Cornwall here and now.
It is sunny in Cornwall tomorrow.
bioengineering is sunny in Cornwall today.
It is sunny in Cornwall nonce.
It is sunny in Cornwall date.
computer science is sunny in Cornwall today.
It is sunny in Cornwall time being.
Nyns yw leuryow an chi salow lemmyn. -- The floors of the house are not safe now. : [('now', '.')]
Yma nebonan y'n gegin lemmyn. -- There is someone in the kitchen now. : [('now', '.')]
Nyns usi an flogh ow koska lemmyn. -- The child is not sleeping now. : [('now', '.')]
A-dro dhe gans lyver yw gwerthys lemmyn. -- About a hundred books are sold now. : [('now', '.')]
Nyns yw hemma dhe les lemmyn. -- This is no use now. : [('now', '.')]
Aga chi yw gwerthys y'n eur ma. -- Their house is sold now. : [('now', '.')]
Pandra! An gewer yw braffa lemmyn. -- What! The weather is finer now. : [('now', '.')]
Ergh a wra hi yn Alban lemmyn. -- It's snowing in Scotland now. : [('now', '.')]
An arghans yw tanow lemmyn. -- Money is scarce now. : [('now', '.')]
Ammeth yw tra vras yn Kernow. -- Agriculture is a big affair in Cornwall. : [('in', 'cornwall')]
Eus. Hi a wra glaw lemmyn. -- There is. It's raining now. : [('now', '.')]
An notenn yw parys lemmyn -- The note is ready now. : [('now', '.')]
Nyns eus le gesys yn kres an dre lemmyn. -- There isn't a place left in the town centre now. : [('now', '.')]
Ugens lyver yw gwerthys lemmyn. -- Twenty books are sold now. : [('now', '.')]
Bys dhe'n eur ma nyns yw an gewer mar lyb dell o hi de. -- Until now the weather is not as wet as it was yesterday. : [('yesterday', '.')]
Nyns yw hi pur lowen lemmyn. -- She is not very happy now. : [('now', '.')]
An glaw yw tynna es dell o de. Nyns o an dhargan gwir, my a dyb. -- The rain is more intense than it was yesterday. The forecast was not true, I think. : [('yesterday', '.')]
Oll an gerens yw marow lemmyn. -- All the near relations are dead now. : [('now', '.')]
Morwenna yw lowen. Hy fenn-bloedh yw hedhyw. -- Morwenna is happy. Her birthday is today. : [('today', '.')]
An byskadoryon yw parys lemmyn. -- The fishermen are ready now. : [('now', '.')]
Yma an dioges yn le'ti lemmyn. -- The farmwife is in the dairy now. : [('now', '.')]
Ni yw lowen lemmyn. -- We are happy now. : [('now', '.')]
Yma neppyth nowydh y'n dre lemmyn. Henn yw bryntin! -- There's something new in the town now. That's splendid! : [('now', '.')]
Yma Jerri ow koska lemmyn. -- Jerry is sleeping now. : [('now', '.')]
Nyns eus anwoes war Pam namoy. -- Pam hasn't got a cold now. : [('now', '.')]
Dha gyttrin yw gyllys lemmyn. -- Your bus is gone now. : [('now', '.')]
Ottena! Yma y wreg ganso lemmyn. -- Look! There's his wife with him now. : [('now', '.')]
Ni yw warbarth lemmyn. -- We are together now. : [('now', '.')]
Yma spas lowr y'n le na lemmyn. -- There is enough room in that place now. : [('now', '.')]
Bronn Wennili yw an ughella menydh yn Kernow. -- Brown Willy is the highest mountain in Cornwall. : [('in', 'cornwall')]
Kewer deg yw brav mes nyns yw an gewer teg lemmyn. -- Fine weather is great but the weather isn't fine now. : [('now', '.')]
An gewer hedhyw yw dihaval diworth an gewer de. -- The weather today is different from the weather yesterday. : [('yesterday', '.')]
Nyns eus denvydh omma kynth yw hi seyth eur lemmyn. -- There's no one here although it's seven o'clock now. : [('now', '.')]
An vamm re worras an kinyow war an voes lemmyn. Kynsa yma kowl onyon. -- Mother has put the dinner on the table now. First there is onion soup. : [('now', '.')]
An chi yw gwerthys lemmyn. -- The house is sold now. : [('now', '.')]
Nyns eus meur a gommolennow lemmyn. -- There are not many clouds now. : [('now', '.')]
Dydh da, Maureen. Brav yw lemmyn. -- Hello, Maureen. It's grand now. : [('now', '.')]

Back to blog index page