Skip to main content

minetext

MINE is a collaboration project between the Niedersächsische Staats- und Universitätsbibliothek Göttingen (SUB) and the Gesellschaft für wissenschaftliche Datenverarbeitung Göttingen (GWDG) with the goal to offer a convenient platform for text analysis.

minetext is a Python package, which facilitates the interaction between Python clients and the MINE system. For other clients, REST API of MINE is the way to go.

Note: minetext only works on Python version >=3.7.

To install it, simply run

$ pip install minetext

Examples

from minetext import EsRequest, Mine

es_request = EsRequest(search_term='biology')
mine = Mine(es_request)

response = mine.search()

for hit in response:
    print(hit.meta.score, hit.mine.dc_title)

The example above shows us how to search in MINE. It is done in 3 steps:

  1. Line 3: create an instance of the EsRequest class with the query set to biology.
  2. Line 4: create an instance of the Mine class. Since all operations are done via this instance, creating this instance is the first required step to interact with the MINE system.
  3. Line 6: search for the word biology in MINE. To access the result, simply loop through the response, as shown in line 8.

Get full-text

from minetext import EsRequest, Mine

# Search for all documents which have full-text
es_request = EsRequest(search_term='_exists_:content')

mine = Mine(es_request)
mine.login()

response = mine.search()

for hit in response:
    print(hit.content)

To access the full-text, authentication is required. It is done by calling the login method of the Mine class, as shown in the example above on line 7. The full-text, if existed, will be accessible via hit.content. The syntax of the search_term is the query string syntax.

For consecutive runs, the credentials is re-used so that users do not have to log in for every run. For more details, please check the Authentication section.

Note: the response object is an instance of the Response class from the elasticsearch-dsl package

For more information, please refer to the full documentation.

Metadata

Release files for minetext 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minetext 0.6.0
File Size Uploaded Provenance
minetext-0.6.0.tar.gz 9.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for minetext 0.6.0
File Interpreter ABI Platform
minetext-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / minetext-0.6.0.tar.gz

Download URL minetext-0.6.0.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4ba365ba17c2326036e2565e7e4fdf4148c189acbe1bdf41a78181ec845a3bd9
BLAKE2b-256 checksum
How to use checksums
0f80b46ce2d45d841a0ef553dd54fbbaa6c5defb8ef0e723620dfb701dc7ef74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Release files / minetext-0.6.0-py3-none-any.whl

Download URL minetext-0.6.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1fb14dbe0e21ccfe7b6b4f6aa61bfaa24732eee9976200580f261b15af0f670
BLAKE2b-256 checksum
How to use checksums
6b9361d88370c5ab03652820c4358af4388c930831a47b73aeb04b83d51ff703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.13

Security for minetext 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page