summaryrefslogtreecommitdiff
path: root/examples/big/MkDict.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-11-03 10:23:06 +0000
committeraarne <aarne@cs.chalmers.se>2006-11-03 10:23:06 +0000
commitdb95cbad6d2b3a5ba8ca90dafbb8e7513637a7e3 (patch)
tree731477e796c8982f9b18a6012813279952a14b0e /examples/big/MkDict.hs
parentc922c0c4885b002b2b553ba24f52502b495fb05e (diff)
bew BigLexEng (not ready)
Diffstat (limited to 'examples/big/MkDict.hs')
-rw-r--r--examples/big/MkDict.hs21
1 files changed, 19 insertions, 2 deletions
diff --git a/examples/big/MkDict.hs b/examples/big/MkDict.hs
index 101019165..babf7809f 100644
--- a/examples/big/MkDict.hs
+++ b/examples/big/MkDict.hs
@@ -17,7 +17,13 @@ mkOne s = case words s of
nopar = filter (flip notElem "()")
mkCatf c r w = case c of
"Noun" -> ["N","regN",w]
+ "PRT" -> ["Adv","mkAdv",w] ----
+ "TITLE" -> ["N","regN",w] ----
"Adject" -> ["A","regA",w]
+ "AdjInf" -> ["A","regA",w] ----
+ "AdjInf_LONG" -> ["A","longA",w] ----
+ "AdjPrd" -> ["A","regA",w] ----
+ "AdjPrd_LONG" -> ["A","longA",w] ----
"Adject_LONG" -> ["A","longA",w]
"Verb" | r == "irreg" -> []
"Verb" -> ["V","regV",w]
@@ -25,7 +31,18 @@ mkOne s = case words s of
"V2" -> ["V2","regV2", w]
"PNoun" -> ["PN","regPN",toUpper (head w): tail w]
'V':'2':'_':prep | r == "irreg" ->
- ["V2","mkV2", w, "_V", map toLower prep]
- x:'2':'_':prep -> [[x]++"2","prep" ++[x]++"2", w, map toLower prep]
+ let p = map toLower prep in ["V2","mkV2_"++p, w, "_V", p]
+ x:'2':'_':prep ->
+ let p = map toLower prep in [[x]++"2","prep" ++[x]++"2"++p, w, p]
+ "V3_NP" | r == "irreg" -> ["V3","irreg", w, "_V"]
+ "V3_NP" -> ["V3","regV3", w]
+ 'V':'3':'_':'P':'P':prep | r == "irreg" ->
+ let p = map toLower prep in ["V3","mkV3_"++p, w, "_V", p]
+ 'V':'3':'_':'P':'P':prep ->
+ let p = map toLower prep in ["V3","mkV3_"++p, w, p]
+ 'V':'3':'_':'S':_ | r == "irreg" -> ["V2","mkV2_S", w, "_V"] ----
+ 'V':'3':'_':'S':_ -> ["V2","mkV2_S", w] ----
+ 'V':'3':'_':_ -> ["V3","mkV3", w] ----
+
_ -> [c,"mk" ++ c, w]