Commit c404754c authored by Gérard Huet's avatar Gérard Huet

Installation setup with Resources

parent c65fab29
......@@ -4874,7 +4874,7 @@ $\ocwlowerid{value}~\ocwlowerid{platform}~=~$\ocwstring{"Station"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{skt\_install\_dir}~=~$\ocwstring{"/Users/huet/Sanskrit/Heritage\_Platform/"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{skt\_resources\_dir}~=~$\ocwstring{"/Users/huet/Sanskrit/Heritage\_Resources/"}\ocweol
\ocwkw{and}~$\ocwlowerid{skt\_resources\_dir}~=~$\ocwstring{"/home/huet/Sanskrit/Heritage\_Resources/"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{public\_skt\_dir}~=~$\ocwstring{"/Library/WebServer/Documents/SKT/"}\ocweol
\ocwindent{0.00em}
......@@ -4916,7 +4916,7 @@ $\ocwlowerid{value}~\ocwlowerid{platform}~=~$\ocwstring{"Station"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{offline\_dir}~=~$\ocwstring{"/private/tmp/SKT\_TEMP/"}\ocweol
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{scl\_install\_dir}~=~$\ocwstring{"/Users/huet/Sanskrit/SCL/scl/"};\ocweol
\ocwkw{and}~$\ocwlowerid{scl\_install\_dir}~=~$\ocwstring{""};\ocweol
\ocweol
\ocwendcode{}\typeout{OcamlWeb file Index.ml}
\ocwmodule{Index}
......@@ -53697,9 +53697,9 @@ $\ocwlowerid{value}~\ocwlowerid{public\_entries\_file}~=~\ocwlowerid{public\_dic
\ocwindent{0.00em}
\ocwbc{} created by \ocwbegindcode{}$\ocwlowerid{make}~\ocwlowerid{releasedata}$\ocwenddcode{}, read by \ocwbegindcode{}$\ocwlowerid{indexerd}$\ocwenddcode{} \ocwec{}\ocweol
\ocwindent{0.00em}
;~\ocweol
;\ocweol
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{sandhis\_file}~=~\ocwlowerid{data}~$\ocwstring{"sandhis.rem"}~\ocweol
$\ocwlowerid{value}~\ocwlowerid{sandhis\_file}~=~\ocwlowerid{public\_data}~$\ocwstring{"sandhis.rem"}~\ocweol
\ocwindent{0.00em}
;~\ocweol
\ocwindent{0.00em}
......@@ -53819,7 +53819,7 @@ NB The \ocwbegindcode{}$\ocwlowerid{transxxx\_file}$\ocwenddcode{} identifiers a
But \ocwbegindcode{}$\ocwlowerid{public\_transxxx\_file}$\ocwenddcode{} is read by \ocwbegindcode{}$\ocwupperid{Load\_transducers}$\ocwenddcode{}.
It would be clearer to have a module \ocwbegindcode{}$\ocwupperid{Dump\_transducers}$\ocwenddcode{} using them.
\ocweol
\label{web.ml:7951}%
\label{web.ml:7933}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{transn\_file}~=~\ocwlowerid{data}~$\ocwstring{"transn.rem"}~\ocwbc{} \ocwbegindcode{}$\ocwlowerid{noun\_automaton}$\ocwenddcode{} \ocwec{}~\ocweol
......@@ -53990,7 +53990,7 @@ $\ocwlowerid{value}~\ocwlowerid{public\_nouns\_file}~=~\ocwlowerid{public\_data}
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{public\_verblinks\_file}~=~\ocwlowerid{public\_data}~$\ocwstring{"verblinks.rem"}\medskip
\label{web.ml:13487}%
\label{web.ml:13469}%
\ocwindent{0.00em}
\ocwkw{and}~$\ocwlowerid{public\_mw\_exc\_file}~=~\ocwlowerid{public\_data}~$\ocwstring{"mw\_exceptions.rem"}\ocweol
\ocwindent{0.00em}
......@@ -54589,7 +54589,7 @@ $\ocwlowerid{value}~\ocwlowerid{indexer\_page}~\ocwlowerid{l}~=~\ocwlowerid{dico
\ocwindent{0.00em}
;\medskip
\label{web.ml:25273}%
\label{web.ml:25255}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{print\_site\_map}~\ocwlowerid{dyn}~\ocwlowerid{lang}~=~$\ocwbc{} the various Web services of the site \ocwec{}\ocweol
\ocwindent{1.00em}
......@@ -54850,7 +54850,7 @@ $[~($\ocwstring{"id"},\ocwstring{"this\_form"}$);~($\ocwstring{"action"},$\ocwlo
\ocwendcode{}\ocwindent{0.00em}
Failsafe aborting of cgi invocation
\ocweol
\label{web.ml:29653}%
\label{web.ml:29635}%
\medskip
\ocwbegincode{}\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{abort}~\ocwlowerid{lang}~\ocwlowerid{s1}~\ocwlowerid{s2}~=~$\ocwkw{do}~\ocweol
......@@ -54923,7 +54923,7 @@ $[~($\ocwstring{"a"},$\ocwupperid{Blue\_});~($\ocwstring{"a"},$\ocwupperid{Green
;~$($\ocwstring{"body"},$\ocwupperid{Mauve\_back});~($\ocwstring{"body"},$\ocwupperid{Pink\_back});~($\ocwstring{"body"},$\ocwupperid{Chamois\_back})$\ocweol
\ocwindent{0.00em}
\ocwbc{};\ocwbegindcode{}$($\ocwstring{"body"},$\ocwupperid{Pict\_om});~($\ocwstring{"body"},$\ocwupperid{Pict\_om2});~($\ocwstring{"body"},$\ocwupperid{Pict\_om3});~($\ocwstring{"body"},$\ocwupperid{Pict\_om4})
~;~($\ocwstring{"body"},$\ocwupperid{Pict\_gan});~($\ocwstring{"body"},$\ocwupperid{Pict\_hare});~($\ocwstring{"body"},$\ocwupperid{Pict\_geo})$\ocwenddcode{} \ocwec{}\ocweol
~;~($\ocwstring{"body"},$\ocwupperid{Pict\_gan});~($\ocwstring{"body"},$\ocwupperid{Pict\_hare});~($\ocwstring{"body"},$\ocwupperid{Pict\_geo})$\ocwenddcode{} deprecated \ocwec{}\ocweol
\ocwindent{1.00em}
;~$($\ocwstring{"table"},$\ocwupperid{Bandeau});~($\ocwstring{"table"},$\ocwupperid{Center\_});~($\ocwstring{"table"},$\ocwupperid{Body});~($\ocwstring{"table"},$\ocwupperid{Pad60})~$\ocweol
\ocwindent{1.00em}
......@@ -54953,7 +54953,7 @@ $[~($\ocwstring{"a"},$\ocwupperid{Blue\_});~($\ocwstring{"a"},$\ocwupperid{Green
\ocwindent{1.00em}
$];$\medskip
\label{css.ml:2690}%
\label{css.ml:2701}%
\ocwindent{0.00em}
$\ocwlowerid{value}~\ocwlowerid{css\_decls}~=$\ocweol
\ocwindent{1.00em}
......@@ -16,11 +16,11 @@
\begin{abstract}
This document is the commented code of the Sanskrit Engine software package.
The programming language is Objective Caml (V4.02.2), under the revised syntax
offered by the Camlp4 preprocessor. This documentation has been
automatically generated by the Ocamlweb package of Jean-Christophe Filli\^atre,
using the {\LaTeX} package, in the literate programming style pioneered by
Don Knuth.
The programming language is Pidgin ML, implemented as Objective Caml (V4.02.2),
under the revised syntax offered by the Camlp4 preprocessor.
This documentation has been automatically generated by the Ocamlweb package
of Jean-Christophe Filli\^atre, using the {\LaTeX} package,
in the literate programming style pioneered by Don Knuth.
This program uses the Zen Computational Linguistics Toolkit. The present
document is a companion volume to its documentation, available as\\
......
......@@ -5,7 +5,7 @@
# Gérard Huet #
# #
############################################################################
# Installation instructions Copyright Gérard Huet 2016 #
# Installation instructions Copyright Gérard Huet 2017 #
############################################################################
This is just a reminder for quick installation.
......@@ -16,15 +16,17 @@ The complete installation procedure is described in file SETUP/INSTALL.
Then install the Camplp4 processor in its 4.02 distribution
(available from https://github.com/ocaml/camlp4).
1) Edit your configuration file.
1) Install the Heritage_resources package:
git@gitlab.inria.fr:huet/Heritage_Resources.git
2) Create your configuration file.
Look at the SETUP/CONFIGS directory to find examples.
SETUP/config_help.txt explains all the fields.
2) Create symbolic link to your configuration file in SETUP dir
Then make a symbolic link to your configuration file in SETUP dir:
ln -s config.you.txt config
The "config" link has to be located into the SETUP directory.
The "config" link has to be located in the SETUP directory.
3) Launch configuration in main dir
......@@ -35,9 +37,6 @@ Then install the Camplp4 processor in its 4.02 distribution
make
5) Install it
If first installation of server, first:
sudo make cold
Afterward, only:
sudo make install
6) Enjoy :-)
......
......@@ -32,9 +32,9 @@ VPATH=$(ZEN)
# $(MAKE) clean; $(MAKE) depend; $(MAKE) all
# CORE package - utilities, transducers, sanskrit and french lexers, dico spec
CORE=$(DISTR_CORE) paths.ml
DISTR_CORE= control.ml version.ml date.ml canon.ml transduction.ml \
encode.ml order.ml padapatha.ml sanskrit.mli sanskrit.ml skt_lexer.ml
CORE=$(DISTR_CORE) paths.ml
DISTR_CORE= control.ml version.ml date.ml canon.ml transduction.ml encode.ml \
order.ml padapatha.ml sanskrit.mli sanskrit.ml skt_lexer.ml test_stamp.ml
# GRAM package - phonetics, morphology, segmentation and tagging engines
GRAM=index.ml phonetics.ml int_sandhi.ml skt_morph.mli morphology.mli naming.ml \
......@@ -54,7 +54,7 @@ mk_index_page.ml mk_grammar_page.ml mk_reader_page.ml mk_sandhi_page.ml \
morpho_ext.ml
# TREE package - tree bank manager and syntax analyser - legacy
TREE= parse_tree.ml parse_apte.ml stemmer.ml tag_tree.ml tag_apte.ml
TREE=parse_tree.ml parse_apte.ml stemmer.ml tag_tree.ml tag_apte.ml
DEBUG=debug.ml
......@@ -73,10 +73,15 @@ COMPILEI=ocamlc -pp "camlp4r pa_extend.cmo" -I $(ZEN) -I +camlp4 -c
LINK=ocamlopt -I $(ZEN) -I +camlp4 dynlink.cmxa camlp4lib.cmxa
# standard distribution of Sanskrit Heritage platform - assumes ZEN library
# standard installation of Sanskrit Heritage platform - assumes ZEN library
engine: cgis reset_caches static_pages regression reader_plugin # parse_apte
engine: test_version cgis reset_caches static_pages regression reader_plugin # parse_apte
# testing consistency of Heritage_resources and Heritage_platform
test_version: paths.cmx gen.cmx version.cmx control.cmx test_stamp.cmx
$(LINK) paths.cmx gen.cmx version.cmx control.cmx test_stamp.cmx \
-o test_stamp
static_pages: css mk_index_page mk_grammar_page mk_sandhi_page mk_reader_page
all: engine static_pages reset_caches reader_plugin sandhi_test
......@@ -288,7 +293,7 @@ debug: gen.cmo version.cmo date.cmo word.cmo zen_lexer.cmo order.cmo \
canon.cmo phonetics.cmo transduction.cmo padapatha.cmo sanskrit.cmo \
sandhi.cmo share.cmo trie.cmo deco.cmo skt_lexer.cmo \
encode.cmo order.cmo lexmap.cmo sandhi.cmo \
morpho_html.cmo cgi.cmo html.cmo indexer.cmo declension.cmo
morpho_html.cmo cgi.cmo html.cmo web.cmo indexer.cmo declension.cmo
(cat debug.ml ; cat -) | ocaml -I +camlp4 -I . -I $(ZEN)
morpho_debug: list2.cmo word.cmo deco.cmo morpho_string.cmo paths.cmo \
......@@ -298,8 +303,7 @@ encode.cmo naming.cmo version.cmo date.cmo html.cmo morpho.cmo
# Documentation of the ML library - all packages
doc:
make Heritage_Platform.pdf
# make doc.html
$(MAKE) Heritage_Platform.pdf
Heritage_Platform.pdf: $(ENGINE)
$(NOWEB) --noweb --tex ../DOC/docintro.tex $(ENGINE) -o ../DOC/Heritage_Platform.tex
......
......@@ -13,9 +13,9 @@
type vmorph =
[ Prim of int and bool and Word.word (* primary conjugation *)
(* gana pada form of present 3rd sg *)
| Causa of Word.word (* causative 3rd sg conjugation *)
| Inten of Word.word (* intensive 3rd sg conjugation *)
(* gana pada form of present 3rd sg for checking *)
| Causa of Word.word (* causative 3rd sg conjugation *)
| Inten of Word.word (* intensive 3rd sg conjugation *)
| Desid of Word.word (* desiderative 3rd sg conjugation *)
]
;
......
......@@ -23,3 +23,7 @@ and anomaly_err_mess = "Anomaly " ^ report_mess
and sys_err_mess = "System error " ^ report_mess
and stream_err_mess = "Stream error - wrong input ? "
;
(* change if Morphology data type changes *)
value data_format_version = 1
;
......@@ -30,7 +30,7 @@ value sheets = (* cascading style sheets data *)
; ("span",Devac); ("span",Header_tran); ("span",Deva16); ("span",Deva16c)
; ("body",Mauve_back); ("body",Pink_back); ("body",Chamois_back)
(*;[("body",Pict_om); ("body",Pict_om2); ("body",Pict_om3); ("body",Pict_om4)
; ("body",Pict_gan); ("body",Pict_hare); ("body",Pict_geo)] *)
; ("body",Pict_gan); ("body",Pict_hare); ("body",Pict_geo)] deprecated *)
; ("table",Bandeau); ("table",Center_); ("table",Body); ("table",Pad60)
; ("table",Yellow_back); ("table",Yellow_cent); ("table",Deep_sky_cent)
; ("table",Salmon_back); ("table",Aquamarine_back)
......
......@@ -9,12 +9,14 @@
(****************************************************************)
(* Beware - remove foo.mli and make depend before debugging foo *)
(* Better yet - remove *.mli (saving them) to get transparency. *)
(****************************************************************)
(* debugging context building *)
(* debugging context building - to adapt according to needs *)
#load "../ZEN/list2.cmo";
#load "../ZEN/gen.cmo"; open Gen;
#load "../ZEN/gen.cmo";
open Gen;
#load "../ZEN/word.cmo"; open Word;
#load "../ZEN/share.cmo";
#load "../ZEN/trie.cmo";
......@@ -23,17 +25,19 @@
#load "../ZEN/zen_lexer.cmo";
#load "paths.cmo";
#load "version.cmo"; open Version;
#load "version.cmo";
open Version;
#load "date.cmo";
#load "install.cmo"; open Install;
#load "cgi.cmo";
#load "html.cmo";
#load "canon.cmo"; open Canon;
#load "phonetics.cmo"; open Phonetics;
#load "web.cmo";
open Web;
#load "cgi.cmo";
#load "canon.cmo";
open Canon;
#load "phonetics.cmo";
open Phonetics;
open List;
open Dico;
open Dictionary;
#load "transduction.cmo";
open Transduction;
#load "encode.cmo";
......@@ -50,8 +54,22 @@ open Sanskrit;
#load "int_sandhi.cmo";
open Int_sandhi;
#load "order.cmo";
#load "sandhi.cmo";
#load "inflected.cmo";
(*
#load "parts.cmo";
#load "control.cmo";
#load "pada.cmo";
#load "verbs.cmo";
open Verbs;
(*
#load "int_sandhi.cmo";
open Int_sandhi;
#load "order.cmo";
#load "sandhi.cmo";
#load "inflected.cmo";
......
......@@ -416,7 +416,7 @@ value styles = fun
]
;
(* Compiles a class into its style for non-css compliant browsers *)
(* Used by Css *)
(* Mostly used by Css to compile the css style sheet *)
value style cla = String.concat "; " (List.map style_sheet (styles cla))
;
value class_of = fun
......
......@@ -76,6 +76,7 @@ value voices_of = fun
(*| "jyaa#1" Atma needed for jiiyate *)
(*| "kan" Atma needed for kaayamaana *)
(*| "van" Atma needed for vanute *)
(*| "mah" also Atma for pft. maamahe *)
(*| "kaafk.s" | "han#1" occur also in Atma in BhG: kaafk.se hani.sye *)
(*| "a~nj" also Atma afkte | "naath" "praz" "sp.rz#1" idem *)
-> Para (* active only *)
......
No preview for this file type
(**************************************************************************)
(* *)
(* The Sanskrit Heritage Platform *)
(* *)
(* Gérard Huet & Pawan Goyal *)
(* *)
(* ©2017 Institut National de Recherche en Informatique et en Automatique *)
(**************************************************************************)
(* Tests consistency of data version of [Heritage_Resources]
with program version of [Heritage_Platform] *)
value check_data_version () =
let resources_version_file = Paths.skt_resources_dir ^ "DATA/version.rem" in
let (data_format_version, data_version) =
(Gen.gobble resources_version_file : (int * string)) in
if Control.data_format_version > data_format_version then do
{ print_string "Your linguistic data are stale\n"
; print_string "Your must install a recent version of Heritage_Resources\n"
; exit 1
} else
if Control.data_format_version < data_format_version then do
{ print_string "Your Heritage_Platform installation is too old\n"
; print_string "Your must re-install a more recent version\n"
; print_string "consistent with data format "
; print_int data_format_version
; print_string "\n"
; exit 1
} else
if data_version = Version.version then () else do
{ print_string "Warning: this platform release "
; print_string ("assumes version " ^ Version.version)
; print_string "of Heritage_Resources\n"
; print_string "while the currently installed Heritage_Resources at "
; print_string resources_version_file
; print_string (" has version " ^ data_version)
; print_string "\n You should consider updating to recent versions\n"
}
;
try check_data_version () with
[ Sys_error m -> failwith ("Wrong structure of Heritage_Resources " ^ m) ]
;
......@@ -2517,7 +2517,7 @@ value compute_ppp_stems entry rstem =
[ (* we first filter out roots with no attested ppp *)
"ak.s" (* vedic a.s.ta overgenerates with a.s.tan *) | "as#1" | "kan"
| "k.si" | "gaa#1" | "paz" | "paa#2" | "praa#1" (* vedic praata omitted *)
| "bal" | "vaz" | "vyac" | "zaz" | "zam#2" | "sac" (* | "spaz#1" *)
| "bal" | "ma.mh" | "vaz" | "vyac" | "zaz" | "zam#2" | "sac" (* | "spaz#1" *)
| "h.r#2"
-> []
(* now participles in -na *)
......@@ -2807,8 +2807,9 @@ value admits_passive = fun
"an#2" | "av" | "as#1" | "iiz#1" | "uc" | "kan" | "kuu" | "k.lp"| "k.si"
| "kha.n.d" | "dyut#1" | "dru#1" | "pat#2" | "paz" | "paa#2" | "pi#2"
| "praa#1" | "ruc#1" | "vas#4" | "vidh#1" | "vip" | "vyac" | "zam#1"
| "zrambh" | "zvit" | "siiv" | "spaz#1" | "spardh" | "h.r#2" | "hrii#1"
-> False
| "zrambh" | "zvit" | "siiv" | "spaz#1" | "spardh" | "h.r#2" | "hrii#1"
| "ma.mh" (* supplied by "mah" *)
-> False
(* But "iiz#1" "uc" "kuu" "k.lp" "dru#1" "pi#2" "ruc#1" "vip" "zam#1"
"zrambh" "siiv" "spardh" "hrii#1" admit ppp. and "k.lp" admits pfp. *)
| _ -> True
......@@ -2950,7 +2951,6 @@ value redup_perf root =
| "cit#1" -> stems "kit" (* idem *)
| "umbh" -> stems "ubh" (* remove penultimate nasal *)
| "nand" -> stems "nad" (* idem *)
| "ma.mh" -> stems "mah" (* idem *)
| "sva~nj" -> stems "svaj" (* idem *)
| "han#1" -> stems "ghan" (* velar h -> gh *)
| "hi#2" -> stems "ghi" (* idem *)
......@@ -3025,7 +3025,7 @@ value redup_perf root =
| "vyath" | "vyadh" | "vyaa" | "jyaa#1" | "pyaa" | "syand" | "dyut#1"
-> 3
(* Whitney§785 also "vyac" and ved. "tyaj#1"; "vyaa" treated other *)
| "kan" | "ma.mh" -> 2 (* ved lengthened redup vow Whitney§786a *)
| "kan" | "mah" -> 2 (* ved lengthened redup vow Whitney§786a *)
| _ -> short v (* reduplicated vowel is short *)
]
and rc = (* reduplicating consonant *) match c with
......@@ -3056,7 +3056,7 @@ value redup_perf root =
| None -> if rc=c || root="bhaj" then match r with
[ [ 1 :: w ] -> match root with
[ "jan" -> (glue (revcode "j~n"),True,True)
| "val" -> (glue revw,False,False)
| "val" | "mah" -> (glue revw,False,False)
| _ -> match w with
[ [ c' ] when consonant c' ->
(revaffix [ 10 (* e *); c ] w,True,True)
......@@ -3445,8 +3445,10 @@ value compute_perfect entry =
| "i" -> let (strong, weak,_,_,_) = redup_perf entry in
compute_perfect_v strong weak entry
| "indh" -> compute_perfectm Primary (revcode "iidh") entry
| _ -> let (strong, weak, olong, eweak, iopt) = redup_perf entry in
match weak with
| "mah" -> let (strong, weak, _, _, _) = redup_perf entry in
compute_perfectm Primary strong entry (* ZZ Atma for Para root *)
| _ -> let (strong, weak, olong, eweak, iopt) = redup_perf entry in
match weak with
[ [ c :: rest ] ->
if c=2 (* aa *) || (c>9 && c<14) (* e ai o au *)
then compute_perfect_aa rest entry (* shortened weak stem *)
......@@ -5448,7 +5450,7 @@ value compute_conjugs_stems entry (vmorph,aa) = do
; (* Perfect *)
if gana=10 then () (* use periphrastic perfect *)
else match entry with
[ "paz" (* d.rz *) | "bruu" (* vac *)
[ "paz" (* d.rz *) | "bruu" (* vac *) | "ma.mh" (* mah *)
| "ind" | "indh" | "inv" | "cakaas" | "vidh#1" -> () (* no perfect *)
| _ -> compute_perfect entry
]
......@@ -5471,7 +5473,7 @@ value compute_conjugs_stems entry (vmorph,aa) = do
-> (st,True)
| [ 10 :: [ 32 :: [ 1 :: st ] ] ] (* remove -ate *)
-> (st,False)
(* We loose some information, but generate both active and middle *)
(* We lose some information, but generate both active and middle *)
| _ -> failwith ("Weird causative " ^ Canon.decode third)
] in
let cpstem = match cstem with
......
......@@ -8,4 +8,4 @@
(**************************************************************************)
(* Generated by make version - see main Makefile *)
value version="2.99" and version_date="2017-05-03";
value version="2.99" and version_date="2017-05-08";
......@@ -5,14 +5,14 @@
# Gérard Huet & Pawan Goyal #
# #
############################################################################
# Makefile of SKT Platform 2017-05-03 Copyright Gérard Huet 2017 #
# Makefile of SKT Platform 2017-05-08 Copyright Gérard Huet 2017 #
############################################################################
# WARNING - Produced from MMakefile by configure - Do not edit manually
# This software presupposes a Unix-like OS environment, with c, make and sed
# Also python is assumed for package management, and javascript for scripts.
# Stand-alone distribution ought to include Zen and Ocaml/Camlp4 distributions.
# Also TeX for typesetting the book, and Apache2 for managing the Web site.
# Also Apache2 for managing the Web site.
############################ VERSIONING ####################################
......@@ -20,10 +20,10 @@
# and separately update lexicon version counter in Heritage.e
VERSION=2.99
# DATE ought to be of the form YYYY-MM-DD, consistently with ISO 8601
DATE=2017-05-03
DATE=2017-05-08
# Sanskrit resources are defined at configuration time:
SKTRESOURCES=/home/huet/Sanskrit/Heritage_Resources/
SKTRESOURCES=/Users/huet/Sanskrit/Heritage_Resources/
DATA=$(SKTRESOURCES)DATA# morphological data and transducers
HERITAGE=$(SKTRESOURCES)DICO# hypertext Heritage read-only
......@@ -351,15 +351,16 @@ XML_MORPHOLOGY=$(SL_XML_MORPHOLOGY) $(WX_XML_MORPHOLOGY) $(XML_DTD)
###########
# Sanskrit Heritage Platform site construction; release with "make release"
all: ZEN
all: ZEN
test -e $(DATA) && echo "Heritage_Resources detected" && exit 0 \
|| echo "You should first install Heritage_Resources at $(DATA)" && exit 1
cd ZEN && $(MAKE) all
cp -Rp $(HERITAGE) . # local copy of DICO
mkdir -p $(MW) # local copy
cp -Rp $(HERITAGE) . # local copy of DICO with up-to-date resources
cp -Rp $(MW) . # local copy of MW
ln -sf $(BOOK) BOOK
ln -sf $(DATA) DATA
# cd ML && $(MAKE) depend # reset dependencies (might be partial subset)
cd ML && $(MAKE) # make engine
cd ML && $(MAKE) test_version
ML/test_stamp
cd ML && $(MAKE) # make engine (testing the data stamp)
$(MAKE) web_services # then all Web services
# When master Makefile SETUP/MMakefile has been changed, do manually:
......@@ -472,8 +473,7 @@ releasecgi:
abrevs:
cp $(BOOK)/abrevs.pdf SITE # for documenting the Website with abbreviations
# if one does not rebuild morphological resources with make scratch, this will
# just release the new lexical data base and Web resources
# This releases on the server the new lexical data base and Web resources
# must be done after releaseMW for links adjustments
releasedata: $(DICO) $(DATA) abrevs
cp $(WEBSOURCES) $(SERVERPUBLICDIR)
......@@ -535,12 +535,13 @@ indexers: ML/indexer ML/indexerd
cp ML/indexer $(CGIDIR)$(CGIINDEX)
cp ML/indexerd $(CGIDIR)$(CGIINDEXD)
#### Version Management and Distribution are now managed by Git ####
##############################
#### Version Management ####
#### Version Management #### Obsolete
##############################
# For release of the SktEngine, make distrib_engine
# For release of the SktPlatform, make distrib_platform
# For release of Heritage_Platform, make distrib_platform
# next operations to perform on http server platform for site update
platform_unload: SktPlatform.$(VERSION).tar.gz
......@@ -551,7 +552,7 @@ software_doc: # needs ocamlweb installed
cd ML && $(MAKE) doc
########################
#### Distribution ####
#### Distribution #### Obsolete
########################
# customise LICENSEs above before distributing
......@@ -593,7 +594,7 @@ distr_automata: # distribution of data derived from Heritage Dictionary
cp -p $(DATA)/XML/*.gz $(DATA)/XML/index.html DISTR/$(DATA)/XML
cp -p $(DATA_LICENSE) DISTR/$(DATA_LICENSE) # customised data license
cp -p $(XMLDATA)/SL_morph.dtd $(XMLDATA)/WX_morph.dtd DISTR/$(DATA)/XML
cp -p $(AUTOMATA) DISTR/$(DATA) # Data for Skt Engine cgi executables
cp -p $(AUTOMATA) DISTR/$(DATA) # Data for Skt_Platform cgi executables
cp -p $(DATAMW) DISTR/$(DATA) # MW alignment
# touch DISTR/automata # for make automata to succeed vacuously
......@@ -605,8 +606,8 @@ distrib: # distribution of ZEN, and of derived Heritage under HTML & PDF formats
mkdir DISTR/BOOK
cp -p $(BOOKPRINTS) DISTR/BOOK # Heritage Skt Dictionary for printing
mkdir DISTR/DOC
cd ML; $(MAKE) Heritage_engine_documentation.pdf;
cp -p DOC/Heritage_engine_documentation.pdf DISTR/DOC
cd ML; $(MAKE) doc
cp -p DOC/Heritage_platform.pdf DISTR/DOC
cp -p DOC/transliterations.pdf DISTR/DOC
cp -p $(MANUAL) DISTR/SITE # user's manual
# cp -p $(ROBOTS) DISTR/SITE # robots permissions
......@@ -615,16 +616,6 @@ distrib: # distribution of ZEN, and of derived Heritage under HTML & PDF formats
touch DISTR/dictionary # for make dictionary to succeed vacuously
touch DISTR/xmlmorphology # for make xmlmorphology to succeed vacuously
distribution: # distribution of the engine with precompiled data
test -e SktEngine.$(VERSION) && echo "Distribution dir exists" \
&& exit 1 || echo "OK"
$(MAKE) distrib
mv DISTR SktEngine.$(VERSION) # SktEngine.$(VERSION) ready for release
distrib_engine: distribution# create distribution tar file of SktEngine
tar czvf SktEngine.$(VERSION).tar.gz SktEngine.$(VERSION)
rm -rf SktEngine.$(VERSION)
# creates an archive SktPlatform.$(VERSION) with the full distribution (55Mb)
distrib_full: distrib# assumes distrib has been run, and thus directory DISTR exists
test -e DISTR || (echo "DISTR inexistant"; exit 1)
......@@ -649,11 +640,12 @@ distrib_full: distrib# assumes distrib has been run, and thus directory DISTR ex
touch DISTR/dictionary # for make dictionary to succeed vacuously
mv DISTR SktPlatform.$(VERSION) # SktPlatform.$(VERSION) fresh
# deprecated: now we may use Git for distribution
distrib_platform: distrib_full # create distribution tar file of full SktPlatform
tar czvf SktPlatform.$(VERSION).tar.gz SktPlatform.$(VERSION)
rm -rf SktPlatform.$(VERSION)
depot: # depot ANL - only SktEngine, no linguistic data
depot: # depot ANL - only SktPlatform, no linguistic data
mkdir DISTR # Distribution directory
mkdir DISTR/ML # Source code library for all packages
mkdir DISTR/SETUP # SETUP dir
......@@ -670,20 +662,20 @@ depot: # depot ANL - only SktEngine, no linguistic data
cp -p $(DOCS) DISTR/DOC # Various documentation and articles
cp -p $(LEX) DISTR/ML # Skt Engine Compiling ML source code
cp -p $(TREE) DISTR/ML # Skt Treebank and Syntax manager
mv DISTR SktEngine_$(VERSION) # SktEngine distribution
mv DISTR SktPlatform_$(VERSION) # Skt_Platform distribution
install: #after distribution to host site: "./configure; make; sudo make install"
# SETUP/issudo.sh
test -f $(SERVERPUBLICDIR)$(DATA)/cache.txt && echo "cold install" || $(MAKE) cold
SETUP/issudo.sh
test -f $(SERVERPUBLICDIR)DATA/cache.txt && echo "cold install" || $(MAKE) cold
test -f $(SERVERPUBLICDIR)$(VAR)/regression.txt && echo "regression install" || $(MAKE) install_regression
$(MAKE) release
# for first installation, do "sudo make cold" before "make install"
cold: # for first install
mkdir -p $(SERVERPUBLICDIR)IMAGES
mkdir -p $(SERVERPUBLICDIR)$(DATA)
mkdir -p $(SERVERPUBLICDIR)DATA
mkdir -p $(SERVERPUBLICDIR)DOC
cd $(SERVERPUBLICDIR)$(DATA); touch $(CACHES); chmod a+w $(CACHES)
cd $(SERVERPUBLICDIR)DATA; touch $(CACHES); chmod a+w $(CACHES)
cp -R $(IMAGES) $(SERVERPUBLICDIR)IMAGES
cp -p $(SCRIPTS) $(SERVERPUBLICDIR)
$(MAKE) empty_caches
......
......@@ -70,4 +70,8 @@ productive use of the platform, that may now accommodate long sentences.
In 2017 A rehaul of the global architecture was achieved, separating
the production of linguistic data resources issued from the generating lexicon
and the platform Web services operations proper.
and the platform Web services operations proper. The two packages
are available at git repositories, namely
git@gitlab.inria.fr:huet/Heritage_Resources.git
git@gitlab.inria.fr:huet/Heritage_Platform.git
......@@ -8,7 +8,7 @@ EXTERNALSERVERHOST='http://sanskrit.uohyd.ac.in/#external host UoH'
EXTERNALINVOCATION='/cgi-bin/scl/SHMT/test_xml.cgi?encoding=WX;out_encoding=Devanagari;text=#external host UoH'
SERVERPUBLICDIR='/Library/WebServer/Documents/SKT/'
SKTDIRURL='/SKT/'
SKTRESOURCES='/home/huet/Sanskrit/Heritage_Resources/'
SKTRESOURCES='/Users/huet/Sanskrit/Heritage_Resources/'
CGIBINURL='/cgi-bin/SKT/'
CGIDIR='/Library/WebServer/CGI-Executables/SKT/'
CGIEXT='.cgi'
......
*********************************************************
* Installation of the Sanskrit Heritage Engine/Platform *
*********************************************************
**************************************************
* Installation of the Sanskrit Heritage Platform *
**************************************************
0. Generalities
This library is developed on Unix/Linux, whereas the end products (Sanskrit
dictionary and Web site) are multi-platform.
This library is developed on Unix/Linux, whereas the end product (Sanskrit
Platform) may run on any Web server.
UNIX tools such as make, tar, sed and gcc are assumed to exist.
We also assume that python has been installed.
We also assume that python and the git revision control system have been
installed (they are pre-installed in most modern operating systems).
Finally, we assume that a Web server such as Apache has been installed.
Most modern operating systems also provide a local Web server, allowing
management of localhost Web sites. You'll need su privilege in order to
install the site.
Installation assumes prior installation of Objective Caml available
from site http://ocaml.org. The latest distribution version
4.02 ought to be used, available in http://ocaml.org/releases/4.02.html
from site http://ocaml.org. The distribution version
4.02 ought to be used, available at"http://ocaml.org/releases/4.02.html".
More recent distributions may work too, but this has not been tested.
The proper sequence of commands is:
./configure
......@@ -28,32 +34,26 @@ sudo make install
The following instructions assume installation under some version of the
Unix operating system, such as FreeBSD, Linux or MacOSX.
They may also apply under to versions of Windows under the Cigwin emulator,
but this has not been tested.
but this has not been tested.
This software is distributed in two possible packages:
A. Sanskrit Engine: permits execution of the Web services with fixed linguistic
resources distributed under the form of compiled databanks.
The gzipped tar file (46Mb) of current distribution version 2.96 may be
downloaded from URL:
http://sanskrit.inria.fr/DISTRIB/SktEngine.2.96.tar.gz
The Sanskrit Heritage Platform, implemented as a set of Web services,
uses a separate package Heritage_resources that defines the Sanskrit
linguistic data necessary for its operation.
Both packages may be pulled as Git packages. In the installation directory,
run successively:
git clone git@gitlab.inria.fr:huet/Heritage_Resources.git
git clone git@gitlab.inria.fr:huet/Heritage_Platform.git
This will create two sub_directories, namely Heritage_Resources
and Heritage_Platform.
B. Sanskrit Platform: this full distribution contains all sources, including
the Sanskrit Heritage Dictionary and all relevant software.
This distribution is currently reserved to the team of developers.
Untarring the distribution tar file creates
a directory such as SktEngine.2.96, containing version 2.96 of the Sanskrit
Engine. You may rename this directory at will. We assume in the following
that its absolute path is called Main. Similarly for a full distribution
such as SktPlatform.2.96.
B. Sanskrit Platform installation.
1. Installation of the SKT Engine
This means installing a local mirror Web site of Sanskrit_platform.
This means installing a mirror Web site with SKT Engine functionalities.
1. Configuration
1.1 Customization
First the user should define a configuration file config.txt in the
First the user should define a configuration file config in the
directory SETUP. He should imitate the format of examples such as
config.amrita.txt (local host) and config.sanskrit.txt (public server).
......@@ -89,6 +89,8 @@ DISPLAY is the default font for Sanskrit text output:
or 'deva' for devanagarii.
SERVERHOST should be the domain name (or IP address) of the target HTTP server.
For instance, use SERVERHOST='127.0.0.1' for localhost service
(SERVERHOST='localhost' should work too).
REMOTESERVERHOST should be the domain name (or IP address) of the target HTTP
server as seen from Internet (whereas SERVERHOST may be 127.0.0.1 for localhost).
EXTERNALSERVERHOST should be the domain name (or IP address) of an external
......@@ -138,80 +140,42 @@ the MMakefile in directory SETUP, which is the Makefile source template.
For instance, if you want to change the standard names of the cgis generated as
Sanskrit engine tools, you have to read the following.
The various cgi-bin executables will be installed (by make releasecgi)
The various cgi-bin executables will be installed
in CGIDIR under names declared as respectively
CGIINDEX, CGIINDEXD, CGIDECL, CGICONJ, CGILEMMA, CGIREADER, CGIPARSER, CGITAGGER and CGISANDHI.
CGIINDEX, CGIINDEXD, CGIDECL, CGICONJ, CGILEMMA, CGIREADER, CGIPARSER, CGITAGGER,
CGISANDHI, CGIGRAPH and CGIUSER.
2. Elaboration of the tools executables
The various linguistic resources are installed by command
make releasedata.
This is simply achieved by command:
make
The complete installation is achieved by command
make full_release.
This compiles the Zen linguistic platform, included in the distribution.
Then it compiles the various Web services of the platform.
3. Installation
If Apache is not currently running on your station, you should initialise
it with "sudo httpd -k start", and consider putting this command
in the scheduling initialisation file of your operating system (crontable).
Subsequent releases to the same server, as well as updates when any change
is done to the
master make file SETUP/MMakefile, should only use the command ./configure.
1.2 Installation of the Zen toolkit
The ZEN toolkit is an independent Ocaml library, distributed under the
LGPL open source license, from site http://yquem.inria.fr/~huet/ZEN.
It should be installed at path Main/ZEN.
For convenience, a copy of its current distribution is included with this
distribution, and may be activated by running
make ZEN
This will compile and install the Zen library.
1.3 Installation proper of Heritage Engine
make
This compiles the various cgi-bin executables.
At this point, make sure that the directory $(SERVERPUBLICDIR) exists on the
server, with subdirectories ZEN, ML, DATA, DATA/XML, and IMAGES. You may need
proper privilege to write in these directories.
server.
For the first installation on a given server, you must execute first:
sudo make cold
For subsequent updates, you only need to execute:
Then execute: