diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-18 15:09:20 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-04-18 15:09:20 -0400 |
commit | 965a3206df834f846f2c560438c80a707dcee4cb (patch) | |
tree | 7b3b817763721b9aac2bf8bc8224ec131859b2e2 /lib/pronunciation.cpp | |
parent | 04338f2b040fee5142904c062e0e38c836601034 (diff) | |
download | verbly-965a3206df834f846f2c560438c80a707dcee4cb.tar.gz verbly-965a3206df834f846f2c560438c80a707dcee4cb.tar.bz2 verbly-965a3206df834f846f2c560438c80a707dcee4cb.zip |
Fixed problem with words containing certain characters
The generator previously had a problem wherein it would ignore WordNet lemmas containing certain non-alpha characters (hyphens, slashes, numbers, apostrophes). In addition to these words not being included in the generated datafile, it had the side effect of causing relationships involving the ignored words (e.g. hypernymy, synonymy, etc) to instead be related to the word with id 0, which did not exist. This rarely caused a failure with direct queries; but it caused hierarchal queries (most notably full hyponymy, which is where the error was noticed) to potentially permit far more lemmas than they should have because a very large number of words could be transitively reached through the sentinel word id 0. The generator has been fixed to not ignore the words containing special characters, which removed the word id 0 from most relationships and therefore fixed hierarchal queries. The only remaining word id 0s are as a synonym of "free-flying" (synset 301380571) and as an anti-mannernym of "aerially" (synset 400202718). This is because the WordNet data is malformed in the definitions of two words: "aerial" (synset 301380267) and "marine" (synset 301380721). The generator ignored those two lines, causing the described error, although the latter word being ignored did not cause any other errors. The bug was discovered when the Twitter bot difference (https://github.com/hatkirby/difference) generated a tweet (https://twitter.com/differencebot/status/722084219925700613) as a result of returning the noun "tearaway" in a full hyponym query of "artifact".
Diffstat (limited to 'lib/pronunciation.cpp')
0 files changed, 0 insertions, 0 deletions