[Hejes-devel] [843] added -bV, bVn function to get_productive_tips(); issue #675
hejes-devel at nytud.hu
hejes-devel at nytud.hu
Thu Jul 11 12:16:15 CEST 2013
Revision: 843
Author: ludanyizs
Date: 2013-07-11 12:16:15 +0200 (Thu, 11 Jul 2013)
Log Message:
-----------
added -bV, bVn function to get_productive_tips(); issue #675
Modified Paths:
--------------
trunk/web2py/applications/helyesiras_webdev/modules/spell.py
Modified: trunk/web2py/applications/helyesiras_webdev/modules/spell.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/modules/spell.py 2013-07-10 12:49:59 UTC (rev 842)
+++ trunk/web2py/applications/helyesiras_webdev/modules/spell.py 2013-07-11 10:16:15 UTC (rev 843)
@@ -40,6 +40,10 @@
}
"""Used by get_productive_tips()"""
+VOWELS = [u'a', 'á', u'e', u'é', u'i', u'í', u'o', u'ó', u'ö', u'ő', u'u', u'ú', u'ü', u'ű']
+"""Used by get_productive_tips()"""
+
+
"""Exception dictionary, used before the engines
File format: wordform TAB 1 (wf. is correct) or 0 (wf. is incorrect) TAB suggestion if incorrect (or empty if correct)
"""
@@ -274,6 +278,18 @@
pronoun = PRONOUNS[morph.tag]
tip = u"Ő azt akarja, hogy " + pronoun + " " + unicode(tok, 'utf8') + u"."
return tip
+ elif ana.pos == "FN":
+ # det = u"az" if tok[0].lower() in VOWELS else u"a"
+ # -ba/-be; -ban/-ben
+ for morph in ana.morphs: # -bV
+ if "ILL" in morph.tag:
+ #tip = u"Hová? kérdésre válaszolva, pl. elmentem " + det + u" " + unicode(tok, 'utf8') + u"."
+ tip = u"Általában a Hol? kérdésre válaszolva."
+ return tip
+ elif "INE" in morph.tag: # -bVn
+ #tip = u"Hol? kérdésre válaszolva, pl. " + det + u" " + unicode(tok, 'utf8') + u" vagyok."
+ tip = u"Általában a Hová? kérdésre válaszolva."
+ return tip
return None
More information about the Hejes-devel
mailing list