My GitHub Stats
Top Repositories
Japanese verb/adjective inflections tool
License: MIT License
When the Igo morphological analyzer fails to correctly parse the given verb (due to an outdated and/or incomplete bundled dictionary), we get this kind of stack trace:
File "some_user_script.py", line 31, in generate_conjugated_entries
for inflection in getInflections(base_verb)["list"]:
File "pykatsuyou.py", line 127, in getInflections
final = finalizeVerb(data, hira)
File "pykatsuyou.py", line 89, in finalizeVerb
data = ruDecider3000(hira)
File "pykatsuyou.py", line 73, in ruDecider3000
if (hira[-2] in PAIRS['あ']) or (hira[-2] in PAIRS['う']) or (hira[-2] in PAIRS['お'] or (text in EXCEPTIONS)):
IndexError: string index out of range
The IndexError happens because hira
is only 1 character long. Why is hira
1 character long? Because hira
is taken from the last morpheme found by Igo. In the case of unknown る verbs like 縮らせる, 荒げる, デコる, ファブる, デレる, 文字る, 火病る, 薫じる, or 倒る, Igo breaks down into multiple components where the features of the last morpheme are '助動詞,*,*,*,文語・ル,基本形,る,ル,ル'
so we get "ル" → ”る”.
Naturally, correct parsing of the above examples is outside the scope of this project (that's a Igo issue) but PyKatsuyou could throw a more precise error than IndexError
like UnknownVerbError
or something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.