summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-03-04 14:58:11 +0000
committeraarne <aarne@cs.chalmers.se>2006-03-04 14:58:11 +0000
commit3589e352cc49c99e9335a97a476fd827b382db2f (patch)
tree889da63a3e0a47c318f76ab7a4af8d01cb322b5f
parent3ff765620c9df08212275b5a3f207fd939a60922 (diff)
treebank creating script; duplicated consonants in LexiconEng
-rw-r--r--doc/gf-history.html23
-rw-r--r--src/GF/Shell/HelpFile.hs16
-rw-r--r--src/GF/Shell/PShell.hs2
-rw-r--r--src/HelpFile16
4 files changed, 48 insertions, 9 deletions
diff --git a/doc/gf-history.html b/doc/gf-history.html
index 9450c8d99..0c913635a 100644
--- a/doc/gf-history.html
+++ b/doc/gf-history.html
@@ -14,6 +14,29 @@ Changes in functionality since May 17, 2005, release of GF Version 2.2
<p>
+4/3 (AR) Added command <tt>use_treebank = ut</tt> for lookup in a treebank.
+This command can be used as a fast substitute for parsing, but also as a
+way to browse treebanks.
+<pre>
+ ut "He adds this to that" | l -multi -- use treebank lookup as parser in translation
+ ut -assocs | grep "ComplV2" -- show all associations with ComplV2
+</pre>
+
+<p>
+
+3/3 (AR) Added option <tt>-treebank</tt> to the <tt>i</tt> command. This adds treebanks to
+the shell state. The possible file formats are
+<ol>
+<li> XML file with a multilingual treebank, produced by <tt>tb -xml</tt>
+<li> tab-organized text file with a unilingual treebank, produced by <tt>ut -assocs</tt>
+</ol>
+Notice that the treebanks in shell state are unilingual, and have strings as keys.
+Multilingual treebanks have trees as keys. In case 1, one unilingual treebank per
+language is built in the shell state.
+
+
+<p>
+
1/3 (AR) Added option <tt>-trees</tt> to the command <tt>tree_bank = tb</tt>.
By this option, the command just returns the trees in the treebank. It can be
used for producing new treebanks with the same trees:
diff --git a/src/GF/Shell/HelpFile.hs b/src/GF/Shell/HelpFile.hs
index d89877a3d..ca795d01c 100644
--- a/src/GF/Shell/HelpFile.hs
+++ b/src/GF/Shell/HelpFile.hs
@@ -245,11 +245,19 @@ txtHelpFile =
"\n rf tb.xml | tb -c -- compare-test treebank from file" ++
"\n rf old.xml | tb -trees | tb -xml -- create new treebank from old" ++
"\n" ++
- "\nlt, lookup_treebank: lt String" ++
+ "\nut, use_treebank: ut String" ++
"\n Lookup a string in a treebank and return the resulting trees." ++
- "\n Use 'tb' to create a treebank and 'i -treebank' to read it in memory." ++
- "\n flag:" ++
- "\n -treebank use this treebank (instead of the latest introduced one) TODO" ++
+ "\n Use 'tb' to create a treebank and 'i -treebank' to read one from" ++
+ "\n a file." ++
+ "\n options:" ++
+ "\n -assocs show all string-trees associations in the treebank" ++
+ "\n -strings show all strings in the treebank" ++
+ "\n -raw return result as string, without typechecking it" ++
+ "\n flags:" ++
+ "\n -treebank use this treebank (instead of the latest introduced one)" ++
+ "\n examples:" ++
+ "\n ut \"He adds this to that\" | l -multi -- use treebank lookup as parser in translation" ++
+ "\n ut -assocs | grep \"ComplV2\" -- show all associations with ComplV2" ++
"\n" ++
"\ntt, test_tokenizer: tt String" ++
"\n Show the token list sent to the parser when String is parsed." ++
diff --git a/src/GF/Shell/PShell.hs b/src/GF/Shell/PShell.hs
index 2c501ab9f..159910755 100644
--- a/src/GF/Shell/PShell.hs
+++ b/src/GF/Shell/PShell.hs
@@ -114,7 +114,7 @@ pCommand ws = case ws of
"cc" : s -> aUnit $ CComputeConcrete $ unwords s
"so" : s -> aUnit $ CShowOpers $ unwords s
"tb" : [] -> aUnit CTreeBank
- "lt" : s -> aString CLookupTreebank s
+ "ut" : s -> aString CLookupTreebank s
"tq" : i:o:[] -> aUnit (CTranslationQuiz (language i) (language o))
"tl":i:o:[] -> aUnit (CTranslationList (language i) (language o))
diff --git a/src/HelpFile b/src/HelpFile
index aff813043..bea9a7b9a 100644
--- a/src/HelpFile
+++ b/src/HelpFile
@@ -216,11 +216,19 @@ tb, tree_bank: tb
rf tb.xml | tb -c -- compare-test treebank from file
rf old.xml | tb -trees | tb -xml -- create new treebank from old
-lt, lookup_treebank: lt String
+ut, use_treebank: ut String
Lookup a string in a treebank and return the resulting trees.
- Use 'tb' to create a treebank and 'i -treebank' to read it in memory.
- flag:
- -treebank use this treebank (instead of the latest introduced one) TODO
+ Use 'tb' to create a treebank and 'i -treebank' to read one from
+ a file.
+ options:
+ -assocs show all string-trees associations in the treebank
+ -strings show all strings in the treebank
+ -raw return result as string, without typechecking it
+ flags:
+ -treebank use this treebank (instead of the latest introduced one)
+ examples:
+ ut "He adds this to that" | l -multi -- use treebank lookup as parser in translation
+ ut -assocs | grep "ComplV2" -- show all associations with ComplV2
tt, test_tokenizer: tt String
Show the token list sent to the parser when String is parsed.