Git Product home page Git Product logo

mcfparser.py's People

Contributors

heatherleaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kod-kristoff

mcfparser.py's Issues

doctest fails on 2 examples

Running python MCFParser.py gives the following output:

**********************************************************************
File "MCFParser.py", line 85, in __main__.Parser
Failed example:
    parser.print_grammar_statistics()
Expected:
    Grammar statistics          ||
    -------------------|--------:|
    Nr. terminals      |       2 |
    Nr. nonterminals   |       2 |
    Nr. nonterm-const. |       3 |
    Nr. grammar rules  |       3 |
    Nr. constituents   |       5 |
    Nr. const. lengths |      12 |
    Nr. empty const.   |       0 |
    Nr. leftc. pairs   |       4 |
    Nr. lcword. pairs  |       2 |
Got:
    Grammar statistics          ||
    -------------------|--------:|
    Nr. terminals      |       4 |
    Nr. nonterminals   |       2 |
    Nr. nonterm-const. |       3 |
    Nr. grammar rules  |       3 |
    Epsilon-free       |    True |
    Nr. constituents   |       5 |
    Nr. const. lengths |      12 |
    Nr. empty const.   |       0 |
    Nr. leftc. pairs   |       4 |
    Nr. lcword. pairs  |       2 |
**********************************************************************
File "MCFParser.py", line 98, in __main__.Parser
Failed example:
    parser.print_parse_statistics()
Exception raised:
    Traceback (most recent call last):
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1289, in __run
        compileflags, 1) in test.globs
      File "<doctest __main__.Parser[6]>", line 1, in <module>
        parser.print_parse_statistics()
      File "MCFParser.py", line 304, in print_parse_statistics
        print "%-11s|" % (hdr,) + "".join("%9s |" % (stat.get(key, "--"),) for key in statkeys)
      File "MCFParser.py", line 304, in <genexpr>
        print "%-11s|" % (hdr,) + "".join("%9s |" % (stat.get(key, "--"),) for key in statkeys)
    TypeError: unhashable type: 'set'
**********************************************************************
1 items had failures:
   2 of   7 in __main__.Parser
***Test Failed*** 2 failures.

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.