BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser) See http://pypi.python.org/pypi/bllipparser/ for Python module.

Overview

BLLIP Reranking Parser

https://travis-ci.org/BLLIP/bllip-parser.png?branch=master https://badge.fury.io/py/bllipparser.png

Copyright Mark Johnson, Eugene Charniak, 24th November 2005 --- August 2006

We request acknowledgement in any publications that make use of this software and any code derived from this software. Please report the release date of the software that you are using, as this will enable others to compare their results to yours.

Overview

BLLIP Parser is a statistical natural language parser including a generative constituent parser (first-stage) and discriminative maximum entropy reranker (second-stage). The latest version can be found on GitHub. This document describes basic usage of the command line interface and describes how to build and run the reranking parser. There are now Python and Java interfaces as well. The Python interface is described in README-python.rst.

Compiling the parser

  1. (optional) For optimal speed, you may want to define $GCCFLAGS specifically for your machine. However, this step can be safely skipped as the defaults are usually fine. With csh or tcsh, try something like:

    shell> setenv GCCFLAGS "-march=pentium4 -mfpmath=sse -msse2 -mmmx"
    

    or:

    shell> setenv GCCFLAGS "-march=opteron -m64"
    
  2. Build the parser with:

    shell> make
    
    • Sidenote on compiling on OS X

      OS X uses the clang compiler by default which cannot currently compile the parser. Try setting this environment variable before building to change the default C++ compiler:

      shell> setenv CXX g++
      

      Recent versions of OS X may have additional issues. See issues 60, 19, and 13 for more information.

Obtaining parser models

The GitHub repository includes parsing and reranker models, though these are mostly around for historical purposes. See this page on BLLIP Parser models for information about obtaining newer and more accurate parsing models.

Running the parser

After it has been built, the parser can be run with:

shell> parse.sh <sourcefile.txt>

For example:

shell> parse.sh sample-text/sample-data.txt

The input text must be pre-sentence segmented with each sentence in an <s> tag:

<s> Sentence 1 </s>
<s> Sentence 2 </s>
...

Note that there needs to be a space before and after the sentence.

The parser distribution currently includes a basic Penn Treebank Wall Street Journal parsing models which parse.sh will use by default. The Python interface to the parser includes a mechanism for listing and downloading additional parsing models (some of which are more accurate, depending on what you're parsing).

The script parse-and-fuse.sh demonstrates how to run syntactic parse fusion. Fusion can also be run via the Python bindings.

The script parse-eval.sh takes a list of treebank files as arguments and extracts the terminal strings from them, runs the two-stage parser on those terminal strings and then evaluates the parsing accuracy with Sparseval. For example, if the Penn Treebank 3 is installed at /usr/local/data/Penn3/, the following code evaluates the two-stage parser on section 24:

shell> parse-eval.sh /usr/local/data/Penn3/parsed/mrg/wsj/24/wsj*.mrg

The Makefile will attempt to automatically download and build Sparseval for you if you run make sparseval.

For more information on Sparseval see this paper:

@inproceedings{roark2006sparseval,
    title={SParseval: Evaluation metrics for parsing speech},
    author={Roark, Brian and Harper, Mary and Charniak, Eugene and
            Dorr, Bonnie and Johnson, Mark and Kahn, Jeremy G and
            Liu, Yang and Ostendorf, Mari and Hale, John and
            Krasnyanskaya, Anna and others},
    booktitle={Proceedings of LREC},
    year={2006}
}

We no longer distribute evalb with the parser since it sometimes skips sentences unnecessarily. Sparseval does not have these issues.

More questions?

There is more information about different components of the parser spread across README files in this distribution (see below). BLLIP Parser is maintained by David McClosky.

Parser details

For details on the running the parser, see first-stage/README.rst. For help retraining the parser, see first-stage/TRAIN/README.rst (also includes some information about the parser model file formats).

Reranker details

See second-stage/README for an overview. second-stage/README-retrain.rst details how to retrain the reranker. The second-stage/programs/*/README files include additional notes about different reranker components.

Other versions of the parser

We haven't tested these all of these and can't support them, but they may be useful if you're working on other platforms or languages.

References

Parser and reranker:

Self-training:

Syntactic fusion:

Comments
  • terminate called after throwing an instance of 'swig::stop_iteration'

    terminate called after throwing an instance of 'swig::stop_iteration'

    I ran into the following issue when trying to run the parser. Any idea what might cause this?

    >>> from bllipparser import RerankingParser
    >>> rrp = RerankingParser.fetch_and_load('WSJ-PTB3', verbose=True)
    >>> rrp.simple_parse("It's that easy.")
    terminate called after throwing an instance of 'swig::stop_iteration'
    Aborted
    

    Thanks!

    help-wanted 
    opened by nahgnaw 13
  • Python 3 version in the works?

    Python 3 version in the works?

    Hi, Are you planning on a Python3 version? It shouldn't be too difficult to port it, basically fixing prints, "open" for "file", and mainly fixing iterable vs. list indexing. Thanks

    Carlos

    help-wanted python 
    opened by cayorodriguez 9
  • Difference in the outPut of bllip-parser and the original Chanrniak rerank parser

    Difference in the outPut of bllip-parser and the original Chanrniak rerank parser

    As far as I understood the bllip-parser is the updated version of the orignal code for Charniak parser. However, I noticed differences in the output of the original Charniak reranking parser and the bllip-parser.

    For example, parsing the sentence " This is some text that we should, presumably, parse! " the Charniak parser labels "parse" as VP whereas the bllip-parser labels it as NP.

    To me, the charniak parser output seems more reasonable. Can you please explain me where this difference is coming from?

    runtime 
    opened by geranis 8
  • Parser's behavior in absence of -K

    Parser's behavior in absence of -K

    When the parser reads from stdin, it behaves strangely if -K is absent. It does not immediately produce output for the first sentence. it waits until the next sentence is given and then it gives output for the previous sentence. It was a problem for me since I was feeding it through a pipe. I found a silly work around though. Instead of giving it an input like .. \n I give ... \n.\n and it works.

    tokenizer 
    opened by syeedibnfaiz 8
  • Compilation issue under OSX

    Compilation issue under OSX

    When attempting to compile BLIIP through TEES, and later directly, I got the following problems:

    -- first, I get a "invalid value '6' in '-O6'" when best-parses is compiled ('make -C second-stage/programs/features best-parses'). It seems that the OSX clang compiler (version 4.2 on my 10.7.5 box) doesn't accept optimization levels that high. Setting it to 3 appears to fix this problem. Note: the compilation of parseIt ('make -C first-stage/PARSE parseIt') uses -O3 instead of -O6; not sure why

    -- second, once the optimization flag is changed, I get the following compilation errors: http://pastebin.com/5CiGgs5Q

    Any help would be appreciated.

    Thanks, Aurélien

    compile 
    opened by ajmazurie 6
  • Parser does not remain silent when it can not parse a sentence

    Parser does not remain silent when it can not parse a sentence

    Sometimes parser can not parse sentence. As README, there is one argument '-S' which tells parser to remain silent when it can not parse any sentence and it just goes to next sentence. But using this argument, parser does not go to next sentence. It still throws exception.

    My input to parser is :

    ./parseIt, -l400, -K, -t4, -S, -EInputTagFile.txt, ../DATA/EN/, InputTextFile.txt

    Output of this command (error) :

    Warning [parseIt.C:266] Sentence 4: Parse failed from 0, inf or nan probabililty -- reparsing without POS constraints Warning [ChartBase.C:172] Sentence 4: estimating the counts on a zero-probability sentence parseIt: MeChart.C:105: Bst& MeChart::findMapParse(): Assertion `s' failed. Aborted (core dumped)

    What is wrong with '-S' argument ? Any suggestions ?

    parser 
    opened by gvjoshi25 5
  • Handling quotes

    Handling quotes

    Given the text John said, "Welcome to the heaven". rrp.simple_parse gives (S1 (S (NP (NNP John)) (VP (VBD said) (, ,) (`` ``) (INTJ (UH Welcome) (PP (TO to) (NP (DT the) (NN heaven)))) ('' '')) (. .))) If I use rrp.parse_tagged with the following tokens and postags

    tokens=[u'John', u'said', u',', u'"', u'Welcome', u'to', u'the', u'heaven', u'"', u'.']
    postags={0: u'NNP', 1: u'VBD', 2: u',', 3: u'``', 4: u'UH', 5: u'TO', 6: u'DT', 7: u'NN', 8: u"''", 9: u'.'}
    

    it returns an empty list.

    Workaround: In tokens, if I change the beginning double quotes to two backticks and ending double quotes to two apostrophe, as tokens=[u'John', u'said', u',', u'``', u'Welcome', u'to', u'the', u'heaven', u"''", u'.'] then it works.

    opened by jofatmofn 4
  • Facing WindowsError: [Error 32] error while running sd.sd.convert_tree

    Facing WindowsError: [Error 32] error while running sd.sd.convert_tree

    The error looks like this : WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\users\nasdnjdn\appdata\local\temp\tmp6xftke'

    Please help with a fix

    opened by ankurgulati 4
  • Changes needed for compiling with clang under OS X

    Changes needed for compiling with clang under OS X

    As clang doesn't have OpenMP implementation, installation of libiomp is needed; can be done using homebrew:

    $ brew install libiomp
    

    FOPENMP environment variable should be set, for example, from command line:

    $ FOPENMP="-liomp5" make
    

    GNU stdio_filebuf API is replaced with portable version from here: http://www.josuttis.com/cppcode/fdstream.hpp Other small changes made, so that clang will compile. Tested under Yosemite with clang version: Apple LLVM version 7.0.0 (clang-700.0.72) No GCC installation needed.

    opened by didzis 4
  • re-train parser get segmentation fault error

    re-train parser get segmentation fault error "/bin/sh: line 1: 64668 Segmentation fault second-stage/programs/prepare-data/ptb -n 20 -x 00 -e"

    Hi, could somebody help me with this error? I'm running the parser under 64bit redhat 5. When training the parser with large dataset, similar to WSJ, I get this segmentation fault error from ptb. I'm using 8 threads.

    "/bin/sh: line 1: 64668 Segmentation fault second-stage/programs/prepare-data/ptb -n 20 -x 00 -e ....."

    Thanks,

    runtime reranker 
    opened by catherine9999 4
  • Makefile error on SunOS

    Makefile error on SunOS

    I got this error on [SunOS charlie 5.10 Generic_144488-06 sun4u sparc SUNW,Sun-Fire-280R]:

    Fatal error in reader: Makefile, line 179: Unexpected end of line seen

    compile 
    opened by syeedibnfaiz 4
  • AttributeError: type object 'CharniakParser' has no attribute 'loadModel'

    AttributeError: type object 'CharniakParser' has no attribute 'loadModel'

    AttributeError: type object 'CharniakParser' has no attribute 'loadModel', from . import CharniakParser as parser from . import JohnsonReranker as reranker

    opened by liutaonuist 3
  • Session crashes when loading RerankingParser.from_unified_model_dir()

    Session crashes when loading RerankingParser.from_unified_model_dir()

    I have installed NegBio, bllipparser with pip and imported the required modules including NegBioParser and RerankingParser. However, when I try to load parser = NegBioParser() the session crashes on the line rrp = RerankingParser.from_unified_model_dir(self.model_dir), the reason in logs was first NO CUDA detected. I fixed it and switched to GPU runtime. After loading all dependencies and parsers, the session crashed again... it gives no message what's wrong, I can just see some logs such as : gzip: stdout: Broken pipe. OR 2022-07-13 17:54:43.937715: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0. and then Kernel restarted

    opened by pythonista0801 1
  • pip install errors on linux (requires installing gcc & gxx)

    pip install errors on linux (requires installing gcc & gxx)

    When installing bllip-parser from Ubuntu via pip (pip install bllipparser), I got Building wheel for bllipparser (setup.py) ... error.

    Per this article, installing these in advance got it working:

    conda install gcc_linux-64
    conda install gxx_linux-64
    

    May be worth adding to an installation piece of a README.

    Full error:

    (base) [email protected]:~/NegBio$ pip install bllipparser                                                                  
    Collecting bllipparser                                                                                                    
      Using cached bllipparser-2016.9.11.tar.gz (555 kB)                                                                      
    Requirement already satisfied: six in /home/mghenis/anaconda3/lib/python3.7/site-packages (from bllipparser) (1.14.0)     
    Building wheels for collected packages: bllipparser                                                                       
      Building wheel for bllipparser (setup.py) ... error                                                                    
      ERROR: Command errored out with exit status 1: 
       command: /home/mghenis/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-instal
    l-p8m15xws/bllipparser/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p8m15xws/bllipparser/setup.py'"'"';f=getattr(tokenize
    , '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file_
    _, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-13eymyau                                                              
           cwd: /tmp/pip-install-p8m15xws/bllipparser/                                                                       
      Complete output (24 lines):                                                                                            
      running bdist_wheel                                                               
      running build                                                                                  
      running build_py                                                                 
      creating build                                                                           
      creating build/lib.linux-x86_64-3.7                                                                                     
      creating build/lib.linux-x86_64-3.7/bllipparser                                       
      copying python/bllipparser/__main__.py -> build/lib.linux-x86_64-3.7/bllipparser         
      copying python/bllipparser/RerankerFeatureCorpus.py -> build/lib.linux-x86_64-3.7/bllipparser                           
      copying python/bllipparser/Utility.py -> build/lib.linux-x86_64-3.7/bllipparser         
      copying python/bllipparser/JohnsonReranker.py -> build/lib.linux-x86_64-3.7/bllipparser
      copying python/bllipparser/__init__.py -> build/lib.linux-x86_64-3.7/bllipparser                                       
      copying python/bllipparser/ParsingShell.py -> build/lib.linux-x86_64-3.7/bllipparser                                    
      copying python/bllipparser/RerankingParser.py -> build/lib.linux-x86_64-3.7/bllipparser                                
      copying python/bllipparser/ModelFetcher.py -> build/lib.linux-x86_64-3.7/bllipparser                                    
      copying python/bllipparser/CharniakParser.py -> build/lib.linux-x86_64-3.7/bllipparser
      running build_ext                                                                                                       
      building 'bllipparser._CharniakParser' extension                                                                        
      creating build/temp.linux-x86_64-3.7                                                                                    
      creating build/temp.linux-x86_64-3.7/first-stage                                                                        
      creating build/temp.linux-x86_64-3.7/first-stage/PARSE                                                                  
      creating build/temp.linux-x86_64-3.7/first-stage/PARSE/swig                                                             
      /home/mghenis/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall 
    -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march
    =nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ft
    ree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mghenis/anaconda3/inclu
    de -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/mghenis/anaconda3/include -fPIC -Ifirst-stage/PARSE/ -I/home/mghenis/an
    aconda3/include/python3.7m -c first-stage/PARSE/swig/wrapper.C -o build/temp.linux-x86_64-3.7/first-stage/PARSE/swig/wrapp
    er.o                                                                                                                      
      x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory                       
      error: command '/home/mghenis/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1                   
      ----------------------------------------
      ERROR: Failed building wheel for bllipparser             
      Running setup.py clean for bllipparser                 
    Failed to build bllipparser                                    
    Installing collected packages: bllipparser
        Running setup.py install for bllipparser ... error            
        ERROR: Command errored out with exit status 1:
         command: /home/mghenis/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-inst
    all-p8m15xws/bllipparser/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p8m15xws/bllipparser/setup.py'"'"';f=getattr(tokeni
    ze, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __fil
    e__, '"'"'exec'"'"'))' install --record /tmp/pip-record-oznoxqhp/install-record.txt --single-version-externally-managed --
    compile --install-headers /home/mghenis/anaconda3/include/python3.7m/bllipparser
             cwd: /tmp/pip-install-p8m15xws/bllipparser/
        Complete output (24 lines):
        running install
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-3.7
        creating build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/__main__.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/RerankerFeatureCorpus.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/Utility.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/JohnsonReranker.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/__init__.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/ParsingShell.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/RerankingParser.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/ModelFetcher.py -> build/lib.linux-x86_64-3.7/bllipparser
        copying python/bllipparser/CharniakParser.py -> build/lib.linux-x86_64-3.7/bllipparser
        running build_ext
        building 'bllipparser._CharniakParser' extension
        creating build/temp.linux-x86_64-3.7
        creating build/temp.linux-x86_64-3.7/first-stage
        creating build/temp.linux-x86_64-3.7/first-stage/PARSE
        creating build/temp.linux-x86_64-3.7/first-stage/PARSE/swig
        /home/mghenis/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wal
    l -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -mar
    ch=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -
    ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mghenis/anaconda3/inc
    lude -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/mghenis/anaconda3/include -fPIC -Ifirst-stage/PARSE/ -I/home/mghenis/
    anaconda3/include/python3.7m -c first-stage/PARSE/swig/wrapper.C -o build/temp.linux-x86_64-3.7/first-stage/PARSE/swig/wra
    pper.o
        x86_64-conda_cos6-linux-gnu-cc: error trying to exec 'cc1plus': execvp: No such file or directory
        error: command '/home/mghenis/anaconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /home/mghenis/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize;
     sys.argv[0] = '"'"'/tmp/pip-install-p8m15xws/bllipparser/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p8m15xws/bllippars
    er/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f
    .close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-oznoxqhp/install-record.txt --sin
    gle-version-externally-managed --compile --install-headers /home/mghenis/anaconda3/include/python3.7m/bllipparser Check th
    e logs for full command output.
    
    opened by MaxGhenis 1
  • Segmentation fault in `InputTree::printproper` when using a comprehension or loop to collect the heads of parse trees

    Segmentation fault in `InputTree::printproper` when using a comprehension or loop to collect the heads of parse trees

    The three lines of code below reliably provoke a segfault for me:

    Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
    [GCC 8.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from bllipparser import RerankingParser, Tree
    >>> parser = RerankingParser.fetch_and_load('WSJ-PTB3')
    >>> [Tree(str(parse.ptb_parse)).head() for parse in parser.parse('singing stars')]
    Segmentation fault
    

    (Apologies for the strange choice of text to parse; I had difficulty finding a text that would provoke a crash instead of a hang, at least on my machine.)

    In case it is useful, a backtrace is given below:

    GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
    Copyright (C) 2018 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from python3...(no debugging symbols found)...done.
    (gdb) r
    Starting program: /usr/bin/python3 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
    [GCC 8.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from bllipparser import RerankingParser, Tree
    >>> parser = RerankingParser.fetch_and_load('WSJ-PTB3')
    >>> [Tree(str(parse.ptb_parse)).head() for parse in parser.parse('singing stars')]
    
    Program received signal SIGSEGV, Segmentation fault.
    __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:423
    423	../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.
    (gdb) bt
    #0  __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:423
    #1  0x00007ffff421c578 in std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) ()
       from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #2  0x00007ffff420ccb4 in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) ()
       from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
    #3  0x00007ffff4536cd5 in std::operator<< <char, std::char_traits<char>, std::allocator<char> > (
        __str=<error: Cannot access memory at address 0x21>, __os=...) at /usr/include/c++/7/bits/basic_string.h:6289
    #4  InputTree::printproper (this=0xd5bbbc0, os=...) at first-stage/PARSE/InputTree.C:318
    #5  0x00007ffff4536c9b in InputTree::printproper (this=0xd5ea050, os=...) at first-stage/PARSE/InputTree.C:330
    #6  0x00007ffff4536c9b in InputTree::printproper (this=0xd5e9d30, os=...) at first-stage/PARSE/InputTree.C:330
    #7  0x00007ffff44d31e6 in InputTree_toString (self=0xd5e9d30) at first-stage/PARSE/swig/wrapper.C:6389
    #8  _wrap_InputTree_toString (self=<optimized out>, args=<optimized out>)
        at first-stage/PARSE/swig/wrapper.C:22318
    #9  0x0000000000502d6f in ?? ()
    #10 0x0000000000506859 in _PyEval_EvalFrameDefault ()
    #11 0x0000000000501945 in _PyFunction_FastCallDict ()
    #12 0x0000000000591461 in ?? ()
    #13 0x00000000005a337c in _PyObject_FastCallDict ()
    #14 0x0000000000544f0a in ?? ()
    #15 0x0000000000563e3e in PyObject_Str ()
    #16 0x00000000005240e5 in ?? ()
    #17 0x00000000005553b5 in ?? ()
    #18 0x00000000005a730c in _PyObject_FastCallKeywords ()
    #19 0x0000000000503073 in ?? ()
    #20 0x0000000000506859 in _PyEval_EvalFrameDefault ()
    #21 0x0000000000501945 in _PyFunction_FastCallDict ()
    #22 0x0000000000591461 in ?? ()
    #23 0x00000000005a337c in _PyObject_FastCallDict ()
    #24 0x000000000061a398 in ?? ()
    #25 0x0000000000563cc1 in PyObject_Repr ()
    #26 0x0000000000585acd in ?? ()
    #27 0x0000000000563cc1 in PyObject_Repr ()
    #28 0x00000000006253ec in PyFile_WriteObject ()
    #29 0x000000000063409c in ?? ()
    #30 0x0000000000565bd1 in _PyCFunction_FastCallDict ()
    #31 0x0000000000599680 in PyObject_CallFunctionObjArgs ()
    #32 0x000000000050a4b1 in _PyEval_EvalFrameDefault ()
    #33 0x0000000000504c28 in ?? ()
    #34 0x0000000000506393 in PyEval_EvalCode ()
    #35 0x0000000000634d52 in ?? ()
    #36 0x00000000004a38c5 in ?? ()
    #37 0x00000000004a5cd5 in PyRun_InteractiveLoopFlags ()
    #38 0x00000000006387b3 in PyRun_AnyFileExFlags ()
    #39 0x000000000063915a in Py_Main ()
    #40 0x00000000004a6f10 in main ()
    

    Incidentally, is there a reason why just

    Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
    [GCC 8.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from bllipparser import RerankingParser
    >>> parser = RerankingParser.fetch_and_load('WSJ-PTB3')
    >>> [parse.ptb_parse.head() for parse in parser.parse('singing stars')]
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 1, in <listcomp>
      File "/usr/local/lib/python3.6/dist-packages/bllipparser/RerankingParser.py", line 169, in head
        return self.__class__(self._tree.headTree())
      File "/usr/local/lib/python3.6/dist-packages/bllipparser/RerankingParser.py", line 39, in __init__
        input_tree_or_string)
    TypeError: input_tree_or_string (None) must be an InputTree or string.
    >>> 
    

    is not supported?

    opened by brady-ds 1
  • slow results in docker

    slow results in docker

    I am not sure if this is the right way to do this but I currently created a dockerfile with a web api which receives input writes it to a file.txt then calls parse.sh file.txt however this takes 8 seconds on a 1 cpu 2 gb memory on aws machine, their must be a better way! :)

    opened by philiptolk 2
  • Error downloading model (101  Network is unreachable)

    Error downloading model (101 Network is unreachable)

    Followed the instructions on the home page. But there's a problem with the model download process.

    When i run wget https://www.dropbox.com/s/ulcfs7my1ifriuu/BLLIP-WSJ-PTB3.tar.bz2?dl=1:

    Fetching model: WSJ-PTB3 from https://www.dropbox.com/s/ulcfs7my1ifriuu/BLLIP-WSJ-PTB3.tar.bz2?dl=1 Traceback (most recent call last): File "", line 1, in File "/home/lzm/.local/lib/python2.7/site-packages/bllipparser/RerankingParser.py", line 897, in fetch_and_load verbose) File "/home/lzm/.local/lib/python2.7/site-packages/bllipparser/ModelFetcher.py", line 124, in download_and_install_model reporthook=status_func) File "/usr/lib/python2.7/urllib.py", line 245, in retrieve fp = self.open(url, data) File "/usr/lib/python2.7/urllib.py", line 213, in open return getattr(self, name)(url) File "/usr/lib/python2.7/urllib.py", line 443, in open_https h.endheaders(data) File "/usr/lib/python2.7/httplib.py", line 1053, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 897, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 859, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1270, in connect HTTPConnection.connect(self) File "/usr/lib/python2.7/httplib.py", line 836, in connect self.timeout, self.source_address) File "/usr/lib/python2.7/socket.py", line 575, in create_connection raise err IOError: [Errno socket error] [Errno 101] Network is unreachable

    opened by liziming5353 4
Owner
Brown Laboratory for Linguistic Information Processing
Brown Laboratory for Linguistic Information Processing
Distributed (Deep) Machine Learning Community 682 Dec 28, 2022
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

eXtreme Gradient Boosting Community | Documentation | Resources | Contributors | Release Notes XGBoost is an optimized distributed gradient boosting l

Distributed (Deep) Machine Learning Community 23.6k Dec 30, 2022
BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser)

BLLIP reranking parser (also known as Charniak-Johnson parser, Charniak parser, Brown reranking parser)

Brown Laboratory for Linguistic Information Processing 218 Dec 17, 2022
C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. See the discussion group @ http://groups.google.com/group/partio-discuss

Partio - A library for particle IO and manipulation This is the initial source code release of partio a tool we used for particle reading/writing. It

Walt Disney Animation Studios 412 Dec 29, 2022
Library that solves the exact cover problem using Dancing Links, also known as DLX.

The DLX Library The DLX library The DLX library solves instances of the exact cover problem, using Dancing Links (Knuth’s Algorithm X). Also included

Ben Lynn 44 Dec 18, 2022
📽 Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C

Highly optimized 2D|3D math library, also known as OpenGL Mathematics (glm) for `C`. cglm provides lot of utils to help math operations to be fast and quick to write. It is community friendly, feel free to bring any issues, bugs you faced.

Recep Aslantas 1.6k Jan 2, 2023
Russian draughts (also known as checkers or shashki) game

Russian draughts (2011) Russian draughts (also known as checkers or shashki) game. This project was implemented by me as a bachelor thesis in 2011 whe

Valery Kirkizh 1 Nov 12, 2021
swhid is an OCaml library to work with persistent identifiers found in Software Heritage, also known as swhid

swhid_compute swhid_compute is an OCaml library to work with persistent identifiers found in Software Heritage, also known as swhid. This library only

OCamlPro 2 Jun 21, 2022
H2O - the optimized HTTP/1, HTTP/2, HTTP/3 server

H2O - an optimized HTTP server with support for HTTP/1.x, HTTP/2 and HTTP/3 (experimental) Copyright (c) 2014-2019 DeNA Co., Ltd., Kazuho Oku, Tatsuhi

H2O 10.2k Dec 30, 2022
tiny HTTP parser written in C (used in HTTP::Parser::XS et al.)

PicoHTTPParser Copyright (c) 2009-2014 Kazuho Oku, Tokuhiro Matsuno, Daisuke Murase, Shigeo Mitsunari PicoHTTPParser is a tiny, primitive, fast HTTP r

H2O 1.6k Jan 1, 2023
https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/

\mainpage json-c Overview and Build Status Building on Unix Prerequisites Build commands CMake options Testing Building with vcpkg Linking to libjson-

json-c 2.6k Dec 31, 2022
Boost.org signals2 module

Signals2, part of collection of the Boost C++ Libraries, is an implementation of a managed signals and slots system. License Distributed under the Boo

Boost.org 52 Dec 1, 2022
Boost.org property_tree module

Maintainer This library is currently maintained by Richard Hodges with generous support from the C++ Alliance. Build Status Branch Status develop mast

Boost.org 36 Dec 6, 2022
Boost.org program_options module

Program Options, part of the collection of Boost C++ Libraries, allows for definition and acquisition of (name, value) pairs from the user via convent

Boost.org 77 Jan 1, 2023
I am planning to add a beginner friendly path for my Juniors to Learn DSA and I will try to provide solutions of every problem also. We can add codeChef Challenge solutions also

DSA-Path-And-Important-Questions I am planning to add a beginner friendly path for my Juniors to Learn DSA Are you a Newbie in programming and want to

Arpit Jain 35 Dec 8, 2022
Python Inference Script is a Python package that enables developers to author machine learning workflows in Python and deploy without Python.

Python Inference Script(PyIS) Python Inference Script is a Python package that enables developers to author machine learning workflows in Python and d

Microsoft 13 Nov 4, 2022