semvec/pypi-packages huggingface dataset:
acronym-extractor 2.0.7
Extracting acronym-definition pairs from pdf or text files
Requires Python: >=3.6
Keywords: python,java,acronyms,extraction,text analysis,pdf to text


# Acronym Extractor
This package is used to extract acronym-definition pairs from pdf files.

## Prerequisites
The package requires Java to be installed on the system in order to run tika for pdf to text conversion.
Install the JDK from https://www.oracle.com/java/technologies/javase-jdk15-downloads.html

## How it works
If the file is a pdf, it uses tika to convert it to text. If the file is a text file, it reads the text from the file.
Before extracting acronyms, it cleans the text by removing extra lines, spaces, and redundant punctuations.
The package uses a combination of regular expressions, extraction patterns, and context to extract acronyms. 

1. It first extracts acronyms using regular expressions. The regular expression is based on the assumption that acronyms are usually written in capital letters.
Therefore, it extracts acronyms that start with a capital letter and end with a capital letter but can have lowercase letters in between.

2. It then extracts acronyms using extraction patterns. The extraction patterns are based on the assumption that acronyms are usually defined in the following format:
> acronym, which is an abbreviation for long-form.
> acronym, which is a short-form for long-form.
> acronym, also known as long-form.
> ...

3. If the above two methods fail to extract an acronym, it returns the context of the acronym and leaves it to the user to decide whether it is an acronym or not.

## Installation
To install the package, run the following command:
```python
pip install acronym_extractor
```

## Usage
To use the package, import the package and use the extract_acronyms function. The function takes one argument: the path to the file, and returns 
a dictionary of acronyms and their definitions.

```python
from acronym_extraction import AcronymExtractor
extractor = AcronymExtractor()
acronyms = extractor.extract_acronyms(path/to/file)
print(acronyms)
```

For further info, visit to our official github page: https://github.com/ali-izhar/acronym_extraction