https://github.com/evilfreelancer/technologies-classifier
Simple neural network for detecting theme in text about informational techmologies
https://github.com/evilfreelancer/technologies-classifier
classification cnn machine-learning sklearn
Last synced: 2 months ago
JSON representation
Simple neural network for detecting theme in text about informational techmologies
- Host: GitHub
- URL: https://github.com/evilfreelancer/technologies-classifier
- Owner: EvilFreelancer
- Created: 2022-11-13T10:43:42.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-20T17:53:21.000Z (almost 3 years ago)
- Last Synced: 2025-02-09T15:15:38.105Z (11 months ago)
- Topics: classification, cnn, machine-learning, sklearn
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Technologies classifier
Simple neural network model based on Sklean framework for detecting technologies in provided text,
on input it will receive any text, in output you will receive array of mentioned technologies.
## How to use
```python
from dataset import ITTechDataset
from model import ITTechModel
# Create a new dataset object and load data
dataset = ITTechDataset(file_path="datasets/texts_with_labels.csv")
# Create and train model
model = ITTechModel(dataset=dataset)
model.fit_transform()
model.train()
# use the model to make predictions on new data
text_to_predict = "Text about ReactJS, VueJS and other JavaScript related things"
predicted_labels = model.predict(text_to_predict)
print(predicted_labels) # >>> ['javascript']
```
## How to save trained model
```python
from dataset import ITTechDataset
from model import ITTechModel
# Create a new dataset object and load data
dataset = ITTechDataset(file_path="datasets/texts_with_labels.csv")
# Train and save model to disk
model = ITTechModel(dataset=dataset, model_path="./model/tech_model.joblib")
model.fit_transform()
model.train()
model.save_model()
```
## How to load saved model
```python
from model import ITTechModel
# Load pretrained model
model = ITTechModel(model_path="./model/tech_model.joblib")
model.load_model()
```
## Dataset example
```csv
text,keys
"Text about JavaScript",javascript
"Text about Django, JavaScript and PHP","javascript,python,php"
...
...
```