Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tdl from grammar #13

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6f9bfed
parse tdl from grammar file, closes #2; allow both lkb and ace gramma…
fcbond Jun 7, 2020
7b52357
made the cgi scripts run (only) on python3; closes #11
fcbond Jun 8, 2020
23b49e7
added a requirements.txt; closes #6
fcbond Jun 8, 2020
ff3dd4f
properly munge docstring from pydelphin; closes #10
fcbond Jun 9, 2020
39c98ef
trouble shooting advice
fcbond Jun 10, 2020
1395921
Merge branch 'tdl-from-grammar' of https://github.com/fcbond/ltdb int…
fcbond Jun 10, 2020
749f6be
Fixed bad print substitution
fcbond Jun 12, 2020
47b1faa
Merge branch 'tdl-from-grammar' of https://github.com/fcbond/ltdb int…
fcbond Jun 12, 2020
ed8dfa8
added options for no gold profiles and extra lisp
fcbond Jun 12, 2020
90f931a
added a chance to add extra lisp before loading script, better loggin…
fcbond Jun 13, 2020
6789f5e
Added description of the new command line options
fcbond Jun 13, 2020
2cfd13f
added more on how it was made
fcbond Jun 13, 2020
f6d31ff
updated for python3
fcbond Jun 22, 2020
c5281ac
several small fixes for robustness
fcbond Jun 23, 2020
bc4de8b
added some quotes to make make-ltdb.bash more robust
fcbond Jun 28, 2020
2223789
fixed lemma search to show examples
fcbond Jul 15, 2020
4b68ac0
read from ace config file
fcbond Jul 15, 2020
caa5341
added pkzip dependency
fcbond Jul 15, 2020
14ecfb5
Added dependency on sqlite3
fcbond Jul 15, 2020
5f8da7f
Update README.rst
fcbond Jul 15, 2020
ef70bd0
Added troubleshooting notes for Ubuntu 18.04 python2/python3 issues
fcbond Jul 15, 2020
2696aa7
added brief explanation of the params file
fcbond Jul 17, 2020
d2258d9
no need for orderedDict in python > 3.7, so changed to just DICT
fcbond Jul 9, 2022
a3a4ea3
make a list, then join it
fcbond Jul 9, 2022
1aefdea
use dict instead of defaultdict
fcbond Jul 9, 2022
e5b415f
quoted many things I should have
fcbond Jul 9, 2022
50985d4
properly encode URLS, closes #20
fcbond Jul 13, 2022
a733fe3
describe assumptions about directory structure, use of virtual enviro…
fcbond Jul 13, 2022
9450dae
maked gold2db more robust for entries with unconvertible MRS
fcbond Jul 14, 2022
abc0583
remove extra space
fcbond Jul 14, 2022
8ea5a14
quote things a little better
fcbond Jul 14, 2022
2b986ce
get the unique constraint right
fcbond Jul 14, 2022
b695d43
pass paramters as needed
fcbond Jul 14, 2022
08e5462
add a rudimentary search for predicates
fcbond Jul 14, 2022
eeeb65d
changed DELPH-IN wiki links to point to github, closes #15
fcbond Jul 14, 2022
69c80b9
even robuster parsing of gold profiles
fcbond Jul 14, 2022
6c9ba70
linked grammar homepage to new wiki; really closes #15
fcbond Jul 19, 2022
b17dfa3
make display of rules robust to missinf kara/made
fcbond Jul 19, 2022
136efff
make Dan happy
fcbond Jul 26, 2022
1336380
better quotes in bash file
fcbond Jul 26, 2022
ab5057c
make sure you list the extra lisp
fcbond Jul 26, 2022
47ce4fc
log warnings in GOLD conversion
fcbond Jul 27, 2022
cea2fe3
if orth-path is not defined, use STEM, document this
fcbond Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions make-ltdb.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ while [ $# -gt 0 -a "${1#-}" != "$1" ]; do
shift 2;
;;
--lisp)
extralisp=${2};
extralisp="${2}";
shift 2;
;;
--nogold)
Expand Down Expand Up @@ -161,11 +161,12 @@ then
unset DISPLAY;
unset LUI;

LISP="
${extralisp}
(format t \"~%LTDB Read Grammar~%\")
LISP="""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think bash has triple-quoted (""") strings. This might work anyway if it's evaluated as an empty string "" followed by a multiline string.

"${extralisp}"
(format t \"~%LTDB Read Grammar~% \")
(lkb::read-script-file-aux \"${lkbscript}\")
(lkb::lkb-load-lisp \".\" \"patch-lextypedb.lsp\")
(format t \"~%LTDB Grammar Version ~A~%\" cl-user::*grammar-version*)
(format t \"~%LTDB Output types~%\")
(lkb::output-types :xml \"${outdir}/${TYPES_FILE}\")
(format t \"~%LTDB Output lrules, rules and roots ~%\")
Expand All @@ -176,7 +177,7 @@ LISP="
(lkb::output-lex-summary lkb::*lexicon* \"${outdir}/${LEXICON_FILE}\")
(format t \"~%LTDB All Done!~%\")
#+allegro (excl:exit)
"
"""
echo "$LISP" > ${lkblog}
echo LISP "${LISP}"
echo "$LISP" | ${LISPCOMMAND} 2>>${lkblog} >>${lkblog}
fcbond marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -253,21 +254,25 @@ echo "ver=$version" >> ${CGI_DIR}/params
### HTML and logs
cp doc/lt-diagram.png html/*.js html/*.css html/ltdb.png ${HTML_DIR}/.
cp ${outdir}/*.log ${HTML_DIR}
if [ -n ${lkbscript} ]

if [ -n "${lkbscript}" ]
then
lkbscript='none'
fi
if [ -n ${extralisp} ]

if [ -n "${extralisp}" ]
then
extralisp='none'
fi
if [ -n ${grammartdl} ]

if [ -n "${grammartdl}" ]
then
grammartdl='none'
fi


python3 makehome.py ${version} ${grammardir} ${lkbscript} ${extralisp} ${grammartdl} > ${HTML_DIR}/index.html
echo python3 makehome.py "${version}" "${grammardir}" "${lkbscript}" "${extralisp}" "${grammartdl}" to "${HTML_DIR}"/index.html

python3 makehome.py "${version}" "${grammardir}" "${lkbscript}" "${extralisp}" "${grammartdl}" > "${HTML_DIR}"/index.html


### All done
Expand Down