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

Fixes for model creation #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on May 24, 2017

  1. Removed claim of Python 3 support for now

    The model creation code does not support Python 3:
    
    Traceback (most recent call last):
      File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
        "__main__", mod_spec)
      File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/home/p264360/git/depccg/build/src/py/lstm_parser_bi.py", line 340, in <module>
        args.func(args)
      File "/home/p264360/git/depccg/build/src/py/lstm_parser_bi.py", line 290, in <lambda>
        if args.mode == "train"
      File "/home/p264360/git/depccg/build/src/py/lstm_parser.py", line 126, in create_traindata
        self._create_samples(trees)
      File "/home/p264360/git/depccg/build/src/py/lstm_parser.py", line 111, in _create_samples
        deps = self._get_dependencies(tree, len(tokens))
      File "/home/p264360/git/depccg/build/src/py/lstm_parser.py", line 95, in _get_dependencies
        assert len(filter(lambda i:i == 0, res)) == 1
    TypeError: object of type 'filter' has no len()
    texttheater committed May 24, 2017
    Configuration menu
    Copy the full SHA
    1fa2e75 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0b4649 View commit details
    Browse the repository at this point in the history
  3. Model creation code now handles Unicode words

    Assumes the input (AUTO) files are UTF-8 encoded and UTF-8 encodes all output
    files in the model directory. Uses the codecs package for reading and writing
    files so that all str objects become unicode objects internally. This should
    also make future porting to Python 3 easier.
    texttheater committed May 24, 2017
    Configuration menu
    Copy the full SHA
    54a2308 View commit details
    Browse the repository at this point in the history