Skip to main content

Use the ChatNoir search engine in PyTerrier.

Project description

PyPi CI Code coverage Python Google Colab Issues Commit activity Downloads License

🔍 chatnoir-pyterrier

Use the ChatNoir search engine in PyTerrier.

Powered by the chatnoir-api package.

Installation

Install the package from PyPI:

pip install chatnoir-pyterrier

Usage

You can use the ChatNoirRetrieve PyTerrier module in any PyTerrier pipeline, like you would do with BatchRetrieve.

from chatnoir_pyterrier import ChatNoirRetrieve

api_key: str = "<API_KEY>"
chatnoir = ChatNoirRetrieve(api_key)
chatnoir.search("python library")

Please check out our sample notebook or open it in Google Colab.

Touché 2023

Are you participating in Touché 2023 task 1 or task 2? We've prepared a sample notebook to show you how to retrieve from the ClueWeb22. Get started by opening it in Google Colab.

Citation

If you use this package, please cite the paper from the ChatNoir authors. You can use the following BibTeX information for citation:

@InProceedings{bevendorff:2018,
  address =               {Berlin Heidelberg New York},
  author =                {Janek Bevendorff and Benno Stein and Matthias Hagen and Martin Potthast},
  booktitle =             {Advances in Information Retrieval. 40th European Conference on IR Research (ECIR 2018)},
  editor =                {Leif Azzopardi and Allan Hanbury and Gabriella Pasi and Benjamin Piwowarski},
  month =                 mar,
  publisher =             {Springer},
  series =                {Lecture Notes in Computer Science},
  site =                  {Grenoble, France},
  title =                 {{Elastic ChatNoir: Search Engine for the ClueWeb and the Common Crawl}},
  year =                  2018
}

Development

To build this package and contribute to its development you need to install the build, and setuptools and wheel packages:

pip install build setuptools wheel

(On most systems, these packages are already pre-installed.)

Installation

Install package and test dependencies:

pip install -e .[test]

Testing

Configure the API keys for testing:

export CHATNOIR_API_KEY="<API_KEY>"
export CHATNOIR_API_KEY_STAGING="<API_KEY>"

Verify your changes against the test suite to verify.

flake8 chatnoir_pyterrier tests examples
pylint -E chatnoir_pyterrier tests examples
pytest chatnoir_pyterrier tests examples

Please also add tests for your newly developed code.

Build wheels

Wheels for this package can be built with:

python -m build

Support

If you hit any problems using this package, please file an issue. We're happy to help!

License

This repository is released under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatnoir-pyterrier-2.0.8.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

chatnoir_pyterrier-2.0.8-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file chatnoir-pyterrier-2.0.8.tar.gz.

File metadata

  • Download URL: chatnoir-pyterrier-2.0.8.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for chatnoir-pyterrier-2.0.8.tar.gz
Algorithm Hash digest
SHA256 ef3d99bd612fced72df5d4cf3fbdb72e0398dd7895b66297f9b7fd5360f35773
MD5 76908ef82c14ca45217af135977fdb83
BLAKE2b-256 b2427480af5b8a3fe96e764e456285481a8290d8e6525d48b30663814dffd308

See more details on using hashes here.

File details

Details for the file chatnoir_pyterrier-2.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for chatnoir_pyterrier-2.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a19afb3a6b42325fcff3e5289e644f19c5d3846822eca54fc2c754eea82c1b14
MD5 d0bebb3a396f6729f0f477787bdd723a
BLAKE2b-256 66079de8ab7b8ebea917861851c8fcd5285167139f7aa4bea0ffe05b3a96245f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page