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.1.0.tar.gz (3.6 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.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for year_extractor-2.1.0.tar.gz
Algorithm Hash digest
SHA256 9a7205ef639e5d2477ce10b16e2267e103ae2d8ee48c144f964702253c412bca
MD5 4554f6b10f761a6315dbca1f4a84e672
BLAKE2b-256 be42f640450d5164ac30ce2ee7b0e19eeb96b1bddbc9f27ba7f39439a2aab837

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for year_extractor-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73ee863e2afe859c47a87ab50d6819967dc9a54bf2c175c459f244ed86462981
MD5 555df2144d1fdfa9c0042f03572d577a
BLAKE2b-256 fd272715ffcd02257b8382b71602bee7e339ebf82aa1a8d28adfa1805d820469

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