Commit 28d4f6e5 authored by Idir Lankri's avatar Idir Lankri

Remove module Save_corpus

parent d91993a1
......@@ -56,8 +56,7 @@ mk_corpus_page.ml
# CORPUS package - corpus manager
CORPUS = corpus.mli corpus.ml corpus_manager.mli corpus_manager.ml \
corpus_manager_cgi.ml save_corpus.mli save_corpus.ml \
save_corpus_cgi.ml
corpus_manager_cgi.ml save_corpus_cgi.ml
# extra file SCLpaths.ml for SCL interfacing - not distributed.
......@@ -258,7 +257,7 @@ save_corpus: save_corpus_cgi.cmx
share.cmx minimap.cmx mini.cmx nums.cmxa \
graph_segmenter.cmx checkpoints.cmx automaton.cmx \
params.cmx interface.cmx multilingual.cmx dir.cmx \
corpus.cmx corpus_manager.cmx save_corpus.cmx $< -o $@
corpus.cmx corpus_manager.cmx $< -o $@
mk_corpus: mk_corpus.cmx
$(LINK) str.cmxa unix.cmxa list2.cmx gen.cmx paths.cmx \
......
value make ~corpus_dir:corpus_dir ~sentence_no:sentence_no ~translit:translit
~unsandhied:unsandhied ~text:text =
let sentence_no = string_of_int sentence_no in
let file = Web.corpus_dir ^ corpus_dir ^ sentence_no ^ ".html" in
let sentence =
let encode = Encode.switch_code translit in
let chunker =
if unsandhied then (* sandhi undone *)
Sanskrit.read_raw_sanskrit
else (* blanks non-significant *)
Sanskrit.read_sanskrit
in
{ Corpus.text = chunker encode text }
in
let save_sentence file =
do
{ Web.output_channel.val := open_out file
; Interface.safe_engine ()
; Corpus.dump_sentence_metadata sentence corpus_dir sentence_no
; close_out Web.output_channel.val
; Web.output_channel.val := stdout }
in
do
{ save_sentence file
; Corpus_manager.make corpus_dir }
;
(* Engine that saves the sentence being analyzed and then displays the
corpus subdirectory corresponding to the saved sentence. *)
value make :
~corpus_dir:string -> ~sentence_no:int -> ~translit:string ->
~unsandhied:bool -> ~text:string -> unit
;
......@@ -265,9 +265,9 @@ TREE=ML/stemmer.ml ML/parse_tree.ml ML/parse_apte.ml ML/tag_tree.ml \
ML/tag_apte.ml
# CORPUS package - corpus manager
CORPUS = ML/corpus.mli ML/corpus.ml ML/corpus_manager.mli \
ML/corpus_manager.ml ML/corpus_manager_cgi.ml \
ML/save_corpus.mli ML/save_corpus.ml ML/save_corpus_cgi.ml
CORPUS = ML/corpus.mli ML/corpus.ml ML/corpus_manager.mli \
ML/corpus_manager.ml ML/corpus_manager_cgi.ml \
ML/save_corpus_cgi.ml
DEBUG= ML/morpho_debug.ml ML/debug.ml
......
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