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

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 

 

For example:

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

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

 Sentence 1 
 Sentence 2 
...

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:

Owner
Brown Laboratory for Linguistic Information Processing
Brown Laboratory for Linguistic Information Processing
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!

  • 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

  • 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?

  • 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.

  • 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

  • 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 ?

  • 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.

  • 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

  • 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.

  • 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,

  • 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

  • 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

  • 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.
    
  • 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?

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

  • 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

  • Error downloading model (501 Not Implemented)

    Error downloading model (501 Not Implemented)

    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 the file downloads fine, but doesn't download using the provided instructions.

    `(chexpert-label) t--$ pip install --user bllipparser Requirement already satisfied: bllipparser in /home/tobi/anaconda3/envs/chexpert-label/lib/python3.6/site-packages (2016.9.11) Requirement already satisfied: six in /home/tobi/anaconda3/envs/chexpert-label/lib/python3.6/site-packages (from bllipparser) (1.11.0) (chexpert-label) t--$ python Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

    from bllipparser import RerankingParser rrp = RerankingParser.fetch_and_load('WSJ-PTB3', verbose=True) Model directory: /home/tobi/.local/share/bllipparser/WSJ-PTB3 Fetching model: WSJ-PTB3 from https://www.dropbox.com/s/ulcfs7my1ifriuu/BLLIP-WSJ-PTB3.tar.bz2?dl=1 Error downloading model (501 Not Implemented)`

Implement yolov5 with Tensorrt C++ api, and integrate batchedNMSPlugin. A Python wrapper is also provided.
Implement yolov5 with Tensorrt C++ api, and integrate batchedNMSPlugin. A Python wrapper is also provided.

yolov5 Original codes from tensorrtx. I modified the yololayer and integrated batchedNMSPlugin. A yolov5s.wts is provided for fast demo. How to genera

Sep 26, 2022
A hierarchical parameter server framework based on MXNet. GeoMX also implements multiple communication-efficient strategies.

Introduction GeoMX is a MXNet-based two-layer parameter server framework, aiming at integrating data knowledge that owned by multiple independent part

Jul 22, 2022
A hierarchical parameter server framework based on MXNet. GeoMX also implements multiple communication-efficient strategies.

Introduction GeoMX is a MXNet-based two-layer parameter server framework, aiming at integrating data knowledge that owned by multiple independent part

Jul 22, 2022
Toy path tracer for my own learning purposes (CPU/GPU, C++/C#, Win/Mac/Wasm, DX11/Metal, also Unity)
Toy path tracer for my own learning purposes (CPU/GPU, C++/C#, Win/Mac/Wasm, DX11/Metal, also Unity)

Toy Path Tracer Toy path tracer for my own learning purposes, using various approaches/techs. Somewhat based on Peter Shirley's Ray Tracing in One Wee

Sep 27, 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)

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

Aug 15, 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

Jul 14, 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

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.

Sep 25, 2022
Russian draughts (also known as checkers or shashki) game
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

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

Jun 21, 2022
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

Sep 7, 2022
An ATTiny85 implementation of the well known sleep aid. Includes circuit, software and 3d printed case design
An ATTiny85 implementation of the well known sleep aid. Includes circuit, software and 3d printed case design

dodowDIY An ATTiny85 implementation of the well known sleep aid. Includes circuit, software and 3d printed case design The STL shells are desiged arou

Sep 4, 2022
C++ implementations of well-known (and some rare) algorithms, while following good software development practices

ProAlgos: C++ This project is focused on implementing algorithms and data structures in C++, while following good software engineering practices, such

Sep 26, 2022
I modified the colmap,when it reconstructs from known pose ,only let it optimize rotation ,fixing position!

Mapping-base-lidar-pose-or-vslam-pose I simply modified the colmap,when it reconstructs from known pose ,only let it optimize rotation ,fixing positio

Aug 14, 2022
cavi is an open-source library that aims to provide performant utilities for closed hierarchies (i.e. all class types of the hierarchy are known at compile time).

cavi cavi is an open-source library that aims to provide performant utilities for closed hierarchies (i.e. all class types of the hierarchy are known

Mar 9, 2022
StarRocks is a next-gen sub-second MPP database for full analysis senarios, including multi-dimensional analytics, real-time analytics and ad-hoc query, formerly known as DorisDB.

StarRocks is a next-gen sub-second MPP database for full analysis senarios, including multi-dimensional analytics, real-time analytics and ad-hoc query, formerly known as DorisDB.

Sep 24, 2022
Windows kernel-mode driver emulating well-known USB game controllers.

Windows kernel-mode driver emulating well-known USB game controllers.

Oct 2, 2022
Fast, Attemptable Route Planner for Navigation in Known and Unknown Environments
Fast, Attemptable Route Planner for Navigation in Known and Unknown Environments

FAR Planner uses a dynamically updated visibility graph for fast replanning. The planner models the environment with polygons and builds a global visi

Sep 21, 2022
New version of the well known ESP32 Radio. Now optional I2S output!

ESP32Radio-V2 New version of the well known ESP32 Radio. Now optional I2S output! Compile time configuration in config.h. Do not forget to upload the

Sep 19, 2022
Spatial extrapolation algorithm: calculate the data of other regions through the data of known regions.
Spatial extrapolation algorithm: calculate the data of other regions through the data of known regions.

Spatial interpolation Author : csl E-Mail : [email protected] OverView Spatial interpolation is often used to convert the measured data of discrete po

Oct 18, 2021