Giter VIP home page Giter VIP logo

spice's Issues

Elasticsearch error in allenNLP-NER

Hi.

When I try to run below code in allenNLP-NER after run elastic_search server in localhost:9200

python nel.py  \
   -data_path "data_path/" \
  -save_path "tag_data_ner" \
  -file_path "trainlist.txt" \
  -dataset 'train' \
  -start 0  \
  -end -1 

I found the error below for every file in trainlist.txt

Failed  KGQA/SPICE/SPICE_release/train/QA_1023/QA_0.json
File KGQA/SPICE/SPICE_release/train/QA_1023/QA_42.json.tagged will be processed ... 
Traceback (most recent call last):
  File "KGQA/SPICE/dataset/ner/allennlp_ner/nel.py", line 69, in add_nel_file
    return _add_nel_file(data_file,outfile, predictor_elmo)
  File "KGQA/SPICE/dataset/ner/allennlp_ner/nel.py", line 108, in _add_nel_file
    r=elasticsearch_query(query=w, res_size=5)
  File "KGQA/SPICE/dataset/ner/allennlp_ner/nel.py", line 56, in elasticsearch_query
    res = elastic_search.search(index='csqa_wikidata', doc_type='entities',
  File "/home/anaconda3/envs/SPICE/lib/python3.9/site-packages/elasticsearch/client/utils.py", line 139, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/home/anaconda3/envs/SPICE/lib/python3.9/site-packages/elasticsearch/client/__init__.py", line 1479, in search
    return self.transport.perform_request(
  File "/home/anaconda3/envs/SPICE/lib/python3.9/site-packages/elasticsearch/transport.py", line 345, in perform_request
    status, headers_response, data = connection.perform_request(
  File "/home/anaconda3/envs/SPICE/lib/python3.9/site-packages/elasticsearch/connection/http_urllib3.py", line 256, in perform_request
    self._raise_error(response.status, raw_data)
  File "/home/anaconda3/envs/SPICE/lib/python3.9/site-packages/elasticsearch/connection/base.py", line 287, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
elasticsearch.exceptions.RequestError: RequestError(400, 'no handler found for uri [/csqa_wikidata/entities/_search] and method [POST]', 'no handler found for uri [/csqa_wikidata/entities/_search] and method [POST]')

Is there any additional setting I missed?

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.