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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: year_extractor-0.1.1-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-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7baab15b520e6b921cb31593609f287ed746e897392c3205cb234d8fb3d6cf8
MD5 3151f12d6d4f955622445f61f7c573e8
BLAKE2b-256 628695cdf75109d3152f3872cbd9646ce7bb895031f04f357d896ddec5661d43

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