logic programming - find synonyms of a given word

2021-04-09 Thread SideStep
Task is to write a program that can decide whether two words are synonyms or not. I have pairs of synonymous words, E.g.: [big large] [large huge] [small little] We can derive the synonymous relationship indirectly: if big is a synonym for large and large is a synonym for huge then b

Re: logic programming - find synonyms of a given word

2021-04-09 Thread Blake Watson
In practice I would probably just build a map, word : #setofsynonyms and whenever a synonym was added [a b], I would add b to a's set and a to b's set. Or, even more likely, a vector, because "a" is probably a homonym (if we're talking English) and if "a" is "bank", I need one set of synonyms for

Re: logic programming - find synonyms of a given word

2021-04-09 Thread Nesvarbu Nereikia
Thanks Blake, the map of sets was my first intuition too. But I don't think we can derive that big is a synonym of huge from such an index. If you look at the example input. On Saturday, April 10, 2021, Blake Watson wrote: > In practice I would probably just build a map, word : #setofsynonyms an