attempto / ace-in-gf Goto Github PK
View Code? Open in Web Editor NEWAttempto Controlled English (http://attempto.ifi.uzh.ch/) in Grammatical Framework (https://www.grammaticalframework.org/)
Attempto Controlled English (http://attempto.ifi.uzh.ch/) in Grammatical Framework (https://www.grammaticalframework.org/)
Rewrite make target lin_acewiki_aceowl_save
to measure each language separately.
i.e.
p -lang=Ace "John asks Mary and John asks Mary or John asks Mary ."
gives 2 trees, in one or
is on the top and in the other and
.
The solution used in mgl/finnishMathFin.gf
is:
mkVar : Str -> MathVar = \s -> P.mkPN (M.nForms2N (M.dSDP s)) ;
Testcases:
Convert a set of ACE sentences to trees. Assume that the ACE implementation does not have ambiguity, i.e. that we get 1 tree per each sentence.
To evaluate the ambiguity in a (non-ACE) concrete grammar, linearize each tree (but generate only one variant), and parse the obtained linearization, obtaining a list of one or more parse trees. One element of this list is the original parse tree, the other trees stand for alternative meanings.
Display the cases where the roundtrip ACE->LangX->ACE goes wrong, e.g.:
# list of test sentences
ACE sentence 1
# list of languages where roundtripping fails
Ger
# list of ACE sentences that demonstrate the ambiguity
ACE sentence 1-Ger-1
ACE sentence 1-Ger-2
...
Spa
ACE sentence 1-Spa-1
...
ACE sentence 2
...
(Write a Haskell program to perform this analysis/visualization. Such a tool is actually not specific to ACE-in-GF, e.g. one could apply it to Phrasebook, where the role of ACE is played by DisambEng.)
Likely choices:
Other options:
This works:
p -lang=Ace "John asks Mary and asks Mary ."
This does not work:
p -lang=Ace "John asks Mary and asks Mary and asks Mary ."
The exhaustive test did not find this problem because the AceWiki Codeco testset contains sentences of max length 8 tokens.
$ cat sentences.txt | sed 's/ *$//' | sed "s/ /|/g" | sed "s/[^|]//g" | sort | uniq -c | sort -nr
15254 |||||||
3158 ||||||
740 |||||
223 ||||
46 |||
1 ||
Words300> p -lang=Ace "John is nothing X ." | l
John is nothing X .
Joan és X .
John er X .
Jan is X .
Jussi on mikään X .
Jean est X .
Johann ist X .
Giovanni è X .
Jānis ir X .
...
Both of the commands given in readme for setup fail:
make pgf_acewiki_aceowl
make pgf_ontograph_40
Both fail with:
"File Numeral.gf does not exist."
Remove grammars/acewiki_aceowl/NumeralDut.gf
given that it becomes available as part of the RGL.
See also commit b206a08
Investigate if this change allows us to remove the copies: GrammaticalFramework/GF@1ea9f7c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.