Skip to main content

A library to extract dates from text and convert them to years.

Project description

Take the Text And Retrieve the Year That Mention

How To Install

!pip install spacy !python -m spacy download en_core_web_lg !pip install year-extractor

Usage

from year_extractor.converter import YearExtractor

Initialize the YearExtractor

extractor = YearExtractor()

Define your text

text = "I graduated in last year."

Extract the year

year = extractor.extract_and_convert(text)

Print the result

print("Extracted year:", year)

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

year_extractor-2.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

year_extractor-2.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file year_extractor-2.0.2.tar.gz.

File metadata

  • Download URL: year_extractor-2.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for year_extractor-2.0.2.tar.gz
Algorithm Hash digest
SHA256 1c69f9386b3890228f8b428a5a2363e0d741656739871e73206998331a607057
MD5 904e7ee487cb7e4c1628431913f658f4
BLAKE2b-256 61d5a5493c513ccb13a8513cc59f6db1824c735417ce082b0449ad58ae6c2c12

See more details on using hashes here.

File details

Details for the file year_extractor-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: year_extractor-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for year_extractor-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25459fbcde54ff756769f9cc22296bc20c8a478d8c4a66954057f12b9a07bf1f
MD5 db58c4719cfb33c1edf399fa4ede9a40
BLAKE2b-256 5b54f785a6216293fe67eafbd23f3f06d9af7d302303e432ed55805856e70f06

See more details on using hashes here.

Supported by

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