Code Monkey home page Code Monkey logo

ltdb's People

Contributors

fcbond avatar lmorgadodacosta avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ltdb's Issues

There is no documentation for Features

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.

from-to for roots

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 :-)

Some questions with displaying tdl

  • Should we wrap as we currently do, or add a horizontal slider?
  • Should we link corefs?
  • Is the LISP tdl or the original better?
  • should we show glbs?

update-alternatives

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.

Use surface forms in examples

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 :).

Error handling

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

PyDelphin v1.0.0 upgrade plan

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?

parsing gold profiles in Jacy fails

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.