Commit da61b943 authored by bguillaum's avatar bguillaum

2.8.0: add option -no_lemma and -no_fs to customize conll conversion


git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/semagramme/dep2pict/trunk@7485 7838e531-6607-4d57-9587-6c381814729c
parent d6624c5c
......@@ -36,6 +36,9 @@ let input = ref Dep
let input_file = ref None
let output_file = ref None
let conll_lemma = ref true
let conll_fs = ref true
let _ =
if Array.length Sys.argv = 1
then (IFDEF BUILD_GUI THEN Gui.main () ELSE Log.critical "Gui not available" END)
......@@ -56,6 +59,9 @@ let _ =
| "-svg"::tail -> output := Svg; opt tail
| "-pdf"::tail -> output := Pdf; opt tail
| "-no_lemma"::tail -> conll_lemma := false; opt tail
| "-no_fs"::tail -> conll_fs := false; opt tail
| others::tail -> Log.fcritical "%s : option unknown!\n%s" others usage
in opt (List.tl (Array.to_list Sys.argv));
......@@ -68,15 +74,15 @@ let _ =
(match (!input, !output) with
| (Xml i, Png) -> ignore (Dep2pict.fromXmlFileToPng in_file out_file i)
| (Dep, Png) -> ignore (Dep2pict.fromDepFileToPng in_file out_file)
| (Conll, Png) -> ignore (Dep2pict.fromConllFileToPng in_file out_file)
| (Conll, Png) -> ignore (Dep2pict.fromConllFileToPng ~lemma:!conll_lemma ~fs:!conll_fs in_file out_file)
| (Xml i, Svg) -> ignore (Dep2pict.fromXmlFileToSvgFile in_file out_file i)
| (Dep, Svg) -> ignore (Dep2pict.fromDepFileToSvgFile in_file out_file)
| (Conll, Svg) -> ignore (Dep2pict.fromConllFileToSvgFile in_file out_file)
| (Conll, Svg) -> ignore (Dep2pict.fromConllFileToSvgFile ~lemma:!conll_lemma ~fs:!conll_fs in_file out_file)
| (Xml i, Pdf) -> ignore (Dep2pict.fromXmlFileToPdf in_file out_file i)
| (Dep, Pdf) -> ignore (Dep2pict.fromDepFileToPdf in_file out_file)
| (Conll, Pdf) -> ignore (Dep2pict.fromConllFileToPdf in_file out_file));
| (Conll, Pdf) -> ignore (Dep2pict.fromConllFileToPdf ~lemma:!conll_lemma ~fs:!conll_fs in_file out_file));
Log.finfo "File %s generated." out_file
with
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment