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},
  ids =                   {potthast:2018c,stein:2018c},
  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 and develop this package you need to install the build package:

pip install build

Installation

Install package dependencies:

pip install -e .

Testing

Install test dependencies:

pip install -e .[test]

Verify your changes against the test suite to verify.

flake8 chatnoir_pyterrier examples tests
pylint -E chatnoir_pyterrier examples tests
CHATNOIR_API_KEY="<API_KEY>" CHATNOIR_API_KEY_STAGING="<API_KEY>" pytest chatnoir_pyterrier examples tests

Please also add tests for your newly developed code.

Build wheels

Wheels for this package can be built by:

python -m build

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.5.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

chatnoir_pyterrier-2.0.5-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chatnoir-pyterrier-2.0.5.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for chatnoir-pyterrier-2.0.5.tar.gz
Algorithm Hash digest
SHA256 463cae62a6749130425139d9fc94520fad5937bf6192b66c622c58e8db671864
MD5 e72810d3ea7f13d537a7e8620cbf8fac
BLAKE2b-256 4ef2f57edab6b4285bced12e8b609c40eec7056171ad1a5e838594ab8d5e1d53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chatnoir_pyterrier-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1828c5d106c5b87340ef9392e2cb2c5d742f329e4e3e0fe9bde7b8872cfe95e1
MD5 ea05adb160c3aee6ef9de1bd03f6955a
BLAKE2b-256 a93c668b6deea23b15f4207bbc3f33fd278b58c0aa5923d63f401d03250e15e2

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