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

Parsing failure: search limit exceeded #4

Open
victoriastuart opened this issue Aug 9, 2017 · 9 comments
Open

Parsing failure: search limit exceeded #4

victoriastuart opened this issue Aug 9, 2017 · 9 comments
Assignees

Comments

@victoriastuart
Copy link

victoriastuart commented Aug 9, 2017

Usual make install:

git clone
./configure --prefix=/mnt/Vancouver/apps/enju_parser/
make
make install
make clean


[victoria@victoria bin]$ ./enju                                                                                                                      
Enju 2.4.4
Copyright (c) 2005-2010, Tsujii Laboratory, The University of Tokyo.
All rights reserved.
Loading grammar module "enju/grammar"... done.
Loading FOM module "enju/synmodel"... done.
Loading parser module "mayz/up"... done.
Loading module "enju/outputdep"... done.
Initializing parser...
  Initializing external tagger: /mnt/Vancouver/apps/enju_parser/bin/stepp -t -e -m /mnt/Vancouver/apps/enju_parser/share/stepp/models_wsj02-21c
  Initializing morphological analyzer: /mnt/Vancouver/apps/enju_parser/bin/enju-morph -s /mnt/Vancouver/apps/enju_parser/lib/enju/DATA
  Initializing supertagger:
    lexicon:   /mnt/Vancouver/apps/enju_parser/lib/enju/DATA/Enju.lexicon
    model:     /mnt/Vancouver/apps/enju_parser/share/liblilfes/enju/enju-super.conf
    parameter: /mnt/Vancouver/apps/enju_parser/lib/enju/DATA/Enju-lex.output.gz
  Loading template database: /mnt/Vancouver/apps/enju_parser/lib/enju/DATA/Enju.templates
  Loading Syntax FOM model: /mnt/Vancouver/apps/enju_parser/lib/enju/DATA/Enju-syn.output.gz
  done.
done.
Ready
Metastasis is the primary cause of cancer-related deaths.
Parsing failure: search limit exceeded

Victoria lives in Vancouver.
Parsing failure: search limit exceeded

^C
[victoria@victoria bin]$ 

Why am I getting this error?

Parsing failure: search limit exceeded
@sumire-uematsu
Copy link
Collaborator

Sorry for the delay.

Notes for maintainers

  • Our POS tagger stepp fails to launch in certain envs
    Finally I reproduced the error on ubuntu server 16.10 on a VM (2GB mem)
  • Enju does not recognize the failure, and ends up throwing search_limit_exceeded status
    To confirm this, launch enju without the tagger and input a POS-tagged sentence
    enju -nt
    A/DT boy/NN runs/VBZ
    

Todo

  • fix bugs (if any) in stepp
  • improve enju's error-handling for external processes

@victoriastuart
Copy link
Author

victoriastuart commented Sep 15, 2017

Hi, thank you for your reply; appreciated!. I've explored this Issue further (still unresolved); here are my notes:

I re-cloned your repo (Sep 15, 2017)

    https://github.com/mynlp/enju

and tried installing Enju as follows:

==============================================================================
INSTALLATION
============

------------------------------------------------------------------------------
1. Python 2.7 virtual environment (usual "./configure ... make ... make install .. make clean" process ...)

    .configure
    make
    make install

FAILS to create .../enju/./bin/enju

    (py27) [victoria@victoria enju]$ ./run-enju

        ./run-enju: line 53: /mnt/Vancouver/apps/enju/./bin/enju: No such file or directory

    (py27) [victoria@victoria enju]$

Here is a partial (last part of) "make install" output below:

        [ ... SNIP! ... ]

        make[5]: Entering directory '/mnt/Vancouver/apps/enju/ll/include/liblilfes'
        make[5]: Nothing to be done for 'install-exec-am'.
         /usr/bin//mkdir -p '/usr/local/include/liblilfes'
        /usr/bin//mkdir: cannot create directory ‘/usr/local/include/liblilfes’: Permission denied
        make[5]: *** [Makefile:473: install-pkgincludeHEADERS] Error 1
        make[5]: Leaving directory '/mnt/Vancouver/apps/enju/ll/include/liblilfes'
        make[4]: *** [Makefile:661: install-am] Error 2
        make[4]: Leaving directory '/mnt/Vancouver/apps/enju/ll/include/liblilfes'
        make[3]: *** [Makefile:500: install-recursive] Error 1
        make[3]: Leaving directory '/mnt/Vancouver/apps/enju/ll/include/liblilfes'
        make[2]: *** [Makefile:377: install-recursive] Error 1
        make[2]: Leaving directory '/mnt/Vancouver/apps/enju/ll/include'
        make[1]: *** [Makefile:464: install-recursive] Error 1
        make[1]: Leaving directory '/mnt/Vancouver/apps/enju/ll'
        make: *** [Makefile:640: install-recursive] Error 1

    (py27) [victoria@victoria enju]$

------------------------------------------------------------------------------
2. Local/Home environment/Non-root install (Python 3.6; Arch Linux X86_64):

----------------------------------------
2.1: NOTE: THIS FAILS (make commands run but directory is EMPTY!):

    ./configure --prefix=/mnt/Vancouver/apps/enju-github/

----------------------------------------
2.2. Re. 2.1, above, you must do this:

    INSTALL_DIR=/mnt/Vancouver/apps/enju-github

    echo $INSTALL_DIR/

        /mnt/Vancouver/apps/enju-github/

    ./configure --prefix=$INSTALL_DIR/        ## ./configure --prefix=/mnt/Vancouver/apps/enju-github/

    make
        ...

    make install
        ...

    make clean
        ...

This results with Enju etc. installed in enju-github/

    ...

[victoria@victoria enju]$ make clean

    ...

[victoria@victoria enju]$ cd ..

[victoria@victoria apps]$ cd enju-github/

==============================================================================
USAGE:
======

[victoria@victoria apps]$ cd enju-github/

[victoria@victoria enju-github]$ dp         ## date; pwd

    Fri Sep 15 10:55:15 PDT 2017
    /mnt/Vancouver/apps/enju-github

[victoria@victoria enju-github]$ l          ## ls -l

    total 16K
    drwxr-xr-x 2 victoria victoria 4.0K Sep 15 10:53 bin
    drwxr-xr-x 3 victoria victoria 4.0K Sep 15 10:52 include
    drwxr-xr-x 3 victoria victoria 4.0K Sep 15 10:52 lib
    drwxr-xr-x 6 victoria victoria 4.0K Sep 15 10:53 share

[victoria@victoria enju-github]$ cd bin/

[victoria@victoria bin]$ l

    total 110M
    -rwxr-xr-x 1 victoria victoria  30M Sep 15 10:52 enju
    -rwxr-xr-x 1 victoria victoria 919K Sep 15 10:52 enju-morph
    -rwxr-xr-x 1 victoria victoria  22M Sep 15 10:52 lilfes
    -rwxr-xr-x 1 victoria victoria  35M Sep 15 10:52 mogura
    -rwxr-xr-x 1 victoria victoria 318K Sep 15 10:53 stepp
    -rwxr-xr-x 1 victoria victoria  23M Sep 15 10:52 super

[victoria@victoria bin]$ ./enju

    Enju 2.4.4
    Copyright (c) 2005-2010, Tsujii Laboratory, The University of Tokyo.
    All rights reserved.
    Loading grammar module "enju/grammar"... done.
    Loading FOM module "enju/synmodel"... done.
    Loading parser module "mayz/up"... done.
    Loading module "enju/outputdep"... done.
    Initializing parser...
      Initializing external tagger: /mnt/Vancouver/apps/enju-github/bin/stepp -t -e -m /mnt/Vancouver/apps/enju-github/share/stepp/models_wsj02-21c
      Initializing morphological analyzer: /mnt/Vancouver/apps/enju-github/bin/enju-morph -s /mnt/Vancouver/apps/enju-github/lib/enju/DATA
      Initializing supertagger:
        lexicon:   /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju.lexicon
        model:     /mnt/Vancouver/apps/enju-github/share/liblilfes/enju/enju-super.conf
        parameter: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju-lex.output.gz
      Loading template database: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju.templates
      Loading Syntax FOM model: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju-syn.output.gz
      done.
    done.
    Ready

    Victoria lives in Vancouver.

    Parsing failure: search limit exceeded

    ^C

[victoria@victoria bin]$ ./enju -nt

    Enju 2.4.4
    Copyright (c) 2005-2010, Tsujii Laboratory, The University of Tokyo.
    All rights reserved.
    Loading grammar module "enju/grammar"... done.
    Loading FOM module "enju/synmodel"... done.
    Loading parser module "mayz/up"... done.
    Loading module "enju/outputdep"... done.
    Initializing parser...
      External tagger disabled
      Initializing morphological analyzer: /mnt/Vancouver/apps/enju-github/bin/enju-morph -s /mnt/Vancouver/apps/enju-github/lib/enju/DATA
      Initializing supertagger:
        lexicon:   /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju.lexicon
        model:     /mnt/Vancouver/apps/enju-github/share/liblilfes/enju/enju-super.conf
        parameter: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju-lex.output.gz
      Loading template database: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju.templates
      Loading Syntax FOM model: /mnt/Vancouver/apps/enju-github/lib/enju/DATA/Enju-syn.output.gz
      done.
    done.
    Ready

    Victoria lives in Vancouver.

    LexAnalyzer: TaggedTokenSplitter: input word format error: Victoria
    Parsing failure: POS tagging error

    She runs the company.

    LexAnalyzer: TaggedTokenSplitter: input word format error: She
    Parsing failure: POS tagging error

    A/DT boy/NN runs/VBZ
    ROOT    ROOT    ROOT    ROOT    -1  ROOT    ROOT    runs    run VBZ VB  2
    runs    run VBZ VB  2   verb_arg1   ARG1    boy boy NN  NN  1
    A   a   DT  DT  0   det_arg1    ARG1    boy boy NN  NN  1

    ^C

[victoria@victoria bin]$

There appears to be a bug (?) in the make / make install process.

Regardless, I hope that output (above) helps ...

Best, Victoria :-)

@miyao-yusuke
Copy link
Contributor

Sorry for the long silence! It appears two problems are involved in this issue.

About the problem of installation, I've introduced a bug and it is fixed in the latest version (see #6). When you run:

./configure --prefix=/mnt/Vancouver/apps/enju_parser/
make
make install

the enju command should be installed in /mnt/Vancouver/apps/enju_parser/bin/

About the problem of "search limit exceeded", the source of the problem is that the POS tagger (stepp) fails to run with segmentation fault in some environment. We could not find a reason for this yet.

@chenwi
Copy link

chenwi commented Jul 31, 2018

I have the same problem "search limit exceeded" . After I installed enju, it can't work. Watting for your help.

@arademaker
Copy link

Same here, do you have plans to solve this issue?

@Eman-Qtiemat
Copy link

same here, please if you update the online Enju demo, so we can at least get an output, until this problem be solved.
thanks

@zeyadodat
Copy link

Hi all,
what raises the problem here is the missing "Yacc", bison, and flex libraries. try to install this library individually.

sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install byacc
sudo apt-get install bison++
sudo apt-get install byacc -j
I hope this solves your issue.

@kaubu
Copy link

kaubu commented Feb 17, 2022

I've got this error too, and unfortunately installing the libraries didn't help.

me@mypc:~$ enju
Enju 2.4.4
Copyright (c) 2005-2010, Tsujii Laboratory, The University of Tokyo.
All rights reserved.
Loading grammar module "enju/grammar"... done.
Loading FOM module "enju/synmodel"... done.
Loading parser module "mayz/up"... done.
Loading module "enju/outputdep"... done.
Initializing parser...
  Initializing external tagger: /usr/local/bin/stepp -t -e -m /usr/local/share/stepp/models_wsj02-21c
  Initializing morphological analyzer: /usr/local/bin/enju-morph -s /usr/local/lib/enju/DATA
  Initializing supertagger:
    lexicon:   /usr/local/lib/enju/DATA/Enju.lexicon
    model:     /usr/local/share/liblilfes/enju/enju-super.conf
    parameter: /usr/local/lib/enju/DATA/Enju-lex.output.gz
  Loading template database: /usr/local/lib/enju/DATA/Enju.templates
  Loading Syntax FOM model: /usr/local/lib/enju/DATA/Enju-syn.output.gz
  done.
done.
Ready
Thomas lives in a manor.
Parsing failure: search limit exceeded

^C
me@mypc:~$ 

@ryoon
Copy link

ryoon commented Aug 21, 2023

I have same problem.
In my case, _featurename_bag.Clear(); in bool CRF_Model::load_from_file(const string & filename, bool verbose)'
in stepp-tagger/crf.cpp gets segfault.

I am using GCC 10.5.0 under NetBSD/amd64 10.99.7.
It seems that g++ from the GCC 10.5.0 acts as C++14 compiler by default.
I have added -std=c++03 to CXXFLAGS environment variable and my problem resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants