A library for technology entity recognition and recommendation
Project description
Entity-Recognition
The Entity-Recognition library utilizes spaCy
, BERTopic
, and Transformers
to provide a robust technology entity
recognition system capable of identifying technological entities within texts and suggesting relevant technologies using
advanced NLP techniques.
The library automatically downloads the required spaCy model if not installed, making it easy to get started.
Features
- Technology Entity Extraction: Automatically extract technology-related terms and tools from texts.
- Recommendation System: Provides context-based technology recommendations.
- BERTopic Integration: Leverages topic modeling to enhance the relevance of recommendations.
- spaCy Matchers: Utilizes custom NLP patterns for precise entity recognition.
Installation
Prerequisites
- Python 3.11+
- pip
Getting Started
Install the library directly from PyPI:
pip install entity-recognition-lib
The required spaCy model (en_core_web_sm
) will be automatically downloaded and installed if not already present on
your system.
Usage
Here's how to use the Entity Recognition library in your Python scripts:
from entity_recognition_lib import EntityRecognizer
# Create an instance of the recognizer
recognizer = EntityRecognizer()
# Example texts
texts = ["I need an Express.js Mongo database backend"]
# Process texts
results = recognizer.process_texts(texts)
print(results)
Expected output:
[
{
"input_text": "I need an Express.js Mongo database backend",
"predicted_topic_name": "575_databases_database_tables_schema",
"extracted_entities": [
{
"entity_name": "Express.js",
"score": 1.0,
"category": "Backend Web Frameworks"
},
{
"entity_name": "MongoDB",
"score": 1.0,
"category": "Databases"
}
],
"recommendations": [
{
"category": "Backend Web Frameworks",
"recommendation": "Express.js"
},
{
"category": "Databases",
"recommendation": "MongoDB"
}
]
}
]
For detailed usage examples and code snippets, please refer to the examples directory in the repository. The examples cover various scenarios, including:
- Basic usage of the library for entity recognition and recommendation generation
- Advanced features such as result analysis and visualization
- Integration samples with popular frameworks like Flask and Streamlit
We recommend exploring the examples to understand how to effectively utilize the Entity-Recognition library in your projects.
Development
Setting Up a Development Environment
-
Clone the repository:
git clone https://github.com/cgoncalves94/entity-recognition.git cd entity-recognition
-
Create and Activate a Virtual Environment:
python -m venv .venv source .venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install Dependencies:
pip install -r requirements.txt
Testing
Run tests to ensure the setup is correct:
pytest
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository on GitHub.
- Clone the forked repository to your machine.
- Create a new branch for your changes.
- Make changes and test.
- Submit a pull request with a comprehensive description of changes.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
Hashes for entity_recognition_lib-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cdb58e5c90eeb50e75811031b7fd95a782984268a57fef3e8a5126926e77263 |
|
MD5 | cc8b2dcb73559a415a6b434a1ddfc0ea |
|
BLAKE2b-256 | 7bfddf33e4406e0014c4b32de461451ccc3ed1c659ef194ee95bdb865f2ca460 |
Hashes for entity_recognition_lib-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50ea4bef4715ea60dc63523ed07caa6d3d7a0f944e8f3dfe6e1c3f58a9532a52 |
|
MD5 | d32118ef946c62b340b7d6cc20ba8d8b |
|
BLAKE2b-256 | 7799ab013fcc765771cc7b62039027fe05394d219e0ed7e0dc2cdf9310388085 |