Synset Representation in The WordNet Library

In the WordNet library, a synset is represented by a struct called Synset. There are 26 members in this struct. While playing with tracing the WordNet graph, I had a chance to use half of them. Let me introduce them. Basic Information About The Synset Itself char* defn is a short description of the synset (a.k.a. gloss). It often includes a couple of short example sentences, too. int* pos is the part of speech of the synset.

Read more →

WordNet Provides Morphological Processing Functions

WordNet library has handy functions to deal with irregular inflections like morphstr(). It tries to find the base form of the given word and the pos (part of speech) in the database. When it comes to looking up a word with WordNet, the word is often unfamiliar for the person. You can guess whether the word is singular or plural form, present or past tense from the context of the sentence.

Read more →

Playing With WordNet as an English Learner

TL; DR WordNet helps English learners with getting a clearer grasp of relationships between a couple of words. Its API lets the users explore the whole network of English words in their own way along with their purpose. WordNet is a huge lexical database of English. Every sense of words is represented as a “synset” (a set of synonyms) in the database. Every synset has its short definition with a couple of example sentences and pointers to related words.

Read more →

Read a File and Redirect the Output to the Same File

To write outputs to a file in a shell, we can use redirection. However, when we read a file and modify the content and redirect to the same original file, we'll get just an empty file. What's going on here? $ cat file bravo delta charlie alpha charlie $ cat file | sort | uniq > file $ cat file # empty file $ Of course, if you redirect to a different file and rename it to the original name, it works as expected.

Read more →

Docker Containers Without a Proper Init Process May Take a Long Time to Terminate

When stopping a container one way or another, like by Ctrl+C or docker stop, Docker sends SIGTERM to the process by default. If the first process (PID = 1) on the container is not a proper init process, the termination may take a long time to be done. It's because processes running as PID 1 are treated differently than usual ones. In Linux, a process running as PID 1 ignores any signal unless the process implements signal handlers on its own.

Read more →

Gentaro "hibariya" Terada

Otaka-no-mori, Chiba, Japan
Email me

Loves Ruby, Internet, and Programming.