liboleg-2010.1.10.0: An evolving collection of Oleg Kiselyov's Haskell modules

Lambda.CFGJ

Description

Interpreting a CFG derivation as a string in Japanese. That is, we generate a yield of a CFG derivation, this time in Japanese.

http://okmij.org/ftp/gengo/NASSLLI10/

Synopsis

Documentation

data JA a Source

We represent each node in the derivation tree by a Japanese phrase or a Japanese sentential form (that is, a phrase with holes). Contrast with the EN interpreter in CFG.hs

Constructors

JA 

Fields

unJA :: TJ a
 

Instances

Symantics JA 
Quantifier JA

The expression for quantifiers ensures that no inverse reading is possible. Only linear reading.

Show (JA S) 

data Case Source

A verb or a verb-like word (e.g., an i-adjective) require arguments of particular cases. We need a way for a verb to specify the desired case of its arguments.

Constructors

Nom 
NomStrong 
Acc 

type SK = (String -> String) -> StringSource

The type family TJ defines the types of sentential forms corresponding to syntactic categories.

As we shall see in QCFGJ.hs, we are going to need high (raised) types of our NP. A verb will ask its argument to turn itself to the desired case.

type family TJ a :: *Source

make_np :: String -> Case -> SKSource

Auxiliary functions for the code below

make_tv :: String -> Case -> Case -> (Case -> SK) -> (Case -> SK) -> StringSource