fcbond / ltdb Goto Github PK
View Code? Open in Web Editor NEWLinguistic Type Data-Base
License: Other
Linguistic Type Data-Base
License: Other
Maybe add this to makehome.py
Only include treebanks parsed with the same grammar version
This would probably be fixed with a new grammar that stores the tokens, ...
We should show the trees, MRS and dmrs.
Best to reify the existing code from ltdb.showsents
.
Now that ltdb also includes rules, it should be linked to for them.
We should provide the modified assets file for this.
Features should be documented in the type where they are introduced.
We should have a table that goes from feature to type that introduces it, so we can find it easily.
To do this we really need the ace config file (or use the lkb)!
Currently roots
end up with kara
and made
values of None
, should be sentence start and sentence end.
Not sure if this should be considered a PyDelphin issue as well: @goodmami
We get the values from node.start
and node.end
. Probably not :-)
Japanese has names for many types but we are not showing them.
<name lang='ja'>承引用陳述ト目的格助詞
The current code is a little clunky
Also relevant for the demo
add 'lxml' in the 'requirements'
https://lxml.de/installation.html
Just show the description and frequency.
I would need some help on the fftb end for this.
LKB_SCRIPT_FILE lkb/script
ACE_CONFIG_FILE ace/config.tdl
This would make installation of the python easier
In Ubuntu 19.10 the script must also receive a priority value:
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 40
The command above works for me.
We can use the delphin.highlight plug-in to make the tdl even more beautiful.
LTDB currently displays lemmas in examples; does that depend on LTDB code or on something else (ACE output)?..
Would be much more convenient to see the examples with surface forms... Especially when they get longer, having just lemmas in Spanish can be confusing :).
Japanese has names for many types but we are not showing them.
<name lang='ja'>承引用陳述ト目的格助詞
We can match the Version to the string in the run file for each profile.
Blanket exceptions hide the true problems.
I am printing the exception e (which is otherwise unused here), but ideally I should catch only exceptions that you expect and can handle.
Finally, it's good practice to only put the statements that can trigger the exception (generally just one line) inside the "try" block, so you don't mix up exceptions from different calls.
Thanks to @goodmami for the comment
requires the profile metadata
We can (and should) do this on the fly.
This repository came up when I was searching GitHub for functionality of PyDelphin that may be changing. The following will break with the v1.0.0 version of PyDelphin, so you can either pin your code to the latest v0.9.x version or port to the new API. This issue is just meant to document the changes that may be necessary when you decide to port; no action is needed just yet.
Old:
[...]
import delphin.mrs
[...]
import delphin.mrs.xmrs
import delphin.mrs.simplemrs
[...]
profile = itsdb.ItsdbProfile(root)
[...]
for row in profile.read_table('item'):
items[row['i-id']] = (row['i-input'], row['i-comment'])
for row in profile.read_table('result'):
[...]
try:
mrs_obj = delphin.mrs.simplemrs.loads(mrs_string, single=True, version=1.1, errors='strict')
# mrs_obj = delphin.mrs.simplemrs.loads(row['mrs'], single=True, version=1.1, strict=False, errors='warn')
# mrs_string = row['mrs'] # CHANGING
mrs_json = delphin.mrs.xmrs.Mrs.to_dict(mrs_obj)
dmrs_json = delphin.mrs.xmrs.Dmrs.to_dict(mrs_obj)
New:
[...]
from delphin.mrs import simplemrs
from delphin.mrs import mrsjson
from delphin.dmrs import dmrsjson
[...]
profile = itsdb.TestSuite(root)
[...]
for row in profile['item']:
items[row['i-id']] = (row['i-input'], row['i-comment'])
for row in profile['result']:
[...]
try:
mrs_obj = simplemrs.decode(mrs_string)
mrs_json = mrsjson.to_dict(mrs_obj)
dmrs_json = dmrsjson.to_dict(mrs_obj)
This is a pretty basic and direct porting to the new API. You may also consider restructuring the loops to use TSQL queries, or at least itsdb.join()
, partly and importantly because parse-id
cannot be relied on to be the same as i-id
.
Also, you use errors='strict'
but I was thinking of removing that functionality. Is it useful for you?
And then maybe be able to look at similar genres.
Currently we read all tdl files (and hand encode some exceptions).
We should use the new tdl parsing of :include etc to read an actual grammar file.
Update them!
This is the message:
Processing /home/bond/git/jacy/tsdb/gold/tc-015
Traceback (most recent call last):
File "gold2db.py", line 122, in <module>
deriv_json,
NameError: name 'deriv_json' is not defined
http://moin.delph-in.net/LkbLtdb#Integration_with_FFTB_and_delphin-viz
I didn't find the ltdburl variable in the render.js. Did something change?
Some type names contain the +
character, which gets interpreted as a space in a URL, e.g.:
https://lr.soh.ntu.edu.sg/~bond/cgi-bin/ERG_mo/showtype.cgi?typ=cp_prop+ques_verb
Escaping it as %2b
works:
https://lr.soh.ntu.edu.sg/~bond/cgi-bin/ERG_mo/showtype.cgi?typ=cp_prop%2bques_verb
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.