All Projects → bobalazek → synaptic-simple-trainer

bobalazek / synaptic-simple-trainer

Licence: MIT License
A ready to go text classification trainer based on synaptic (https://github.com/cazala/synaptic)

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to synaptic-simple-trainer

MetaCat
Minimally Supervised Categorization of Text with Metadata (SIGIR'20)
Stars: ✭ 52 (+173.68%)
Mutual labels:  text-classification
Caver
Caver: a toolkit for multilabel text classification.
Stars: ✭ 38 (+100%)
Mutual labels:  text-classification
text-classification-small-datasets
Building a text classifier with extremely small datasets
Stars: ✭ 34 (+78.95%)
Mutual labels:  text-classification
Product-Categorization-NLP
Multi-Class Text Classification for products based on their description with Machine Learning algorithms and Neural Networks (MLP, CNN, Distilbert).
Stars: ✭ 30 (+57.89%)
Mutual labels:  text-classification
extremeText
Library for fast text representation and extreme classification.
Stars: ✭ 141 (+642.11%)
Mutual labels:  text-classification
TorchBlocks
A PyTorch-based toolkit for natural language processing
Stars: ✭ 85 (+347.37%)
Mutual labels:  text-classification
small-text
Active Learning for Text Classification in Python
Stars: ✭ 241 (+1168.42%)
Mutual labels:  text-classification
Text and Audio classification with Bert
Text Classification in Turkish Texts with Bert
Stars: ✭ 34 (+78.95%)
Mutual labels:  text-classification
textgo
Text preprocessing, representation, similarity calculation, text search and classification. Let's go and play with text!
Stars: ✭ 33 (+73.68%)
Mutual labels:  text-classification
Python-for-Text-Classification
Python for Text Classification with Machine Learning in Python 3.6.
Stars: ✭ 32 (+68.42%)
Mutual labels:  text-classification
classification
Vietnamese Text Classification
Stars: ✭ 39 (+105.26%)
Mutual labels:  text-classification
Naive-Resume-Matching
Text Similarity Applied to resume, to compare Resumes with Job Descriptions and create a score to rank them. Similar to an ATS.
Stars: ✭ 27 (+42.11%)
Mutual labels:  text-classification
HiGitClass
HiGitClass: Keyword-Driven Hierarchical Classification of GitHub Repositories (ICDM'19)
Stars: ✭ 58 (+205.26%)
Mutual labels:  text-classification
WSDM-Cup-2019
[ACM-WSDM] 3rd place solution at WSDM Cup 2019, Fake News Classification on Kaggle.
Stars: ✭ 62 (+226.32%)
Mutual labels:  text-classification
monkeylearn-java
Official Java client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Java apps.
Stars: ✭ 23 (+21.05%)
Mutual labels:  text-classification
stravaV10
Open source bike GPS: with Strava segments !
Stars: ✭ 34 (+78.95%)
Mutual labels:  trainer
NewsMTSC
Target-dependent sentiment classification in news articles reporting on political events. Includes a high-quality data set of over 11k sentences and a state-of-the-art classification model.
Stars: ✭ 54 (+184.21%)
Mutual labels:  text-classification
DeepClassifier
DeepClassifier is aimed at building general text classification model library.It's easy and user-friendly to build any text classification task.
Stars: ✭ 25 (+31.58%)
Mutual labels:  text-classification
Kaggle-project-list
Summary of my projects on kaggle
Stars: ✭ 20 (+5.26%)
Mutual labels:  text-classification
NSP-BERT
The code for our paper "NSP-BERT: A Prompt-based Zero-Shot Learner Through an Original Pre-training Task —— Next Sentence Prediction"
Stars: ✭ 166 (+773.68%)
Mutual labels:  text-classification

Synaptic Simple Trainer

A ready to go text classification trainer based on synaptic

Installation

npm install synaptic-simple-trainer --save

How to use

data.js

var data = {
    train: [
        {
            text: 'that was a very good movie',
            class: 'positive',
        },
        {
            text: 'this was a great movie',
            class: 'positive',
        },
        {
            text: 'the movie was awesome',
            class: 'positive',
        },
        {
            text: 'I absolutely loved the movie',
            class: 'positive',
        },
        {
            text: 'the movie was pretty bad',
            class: 'positive',
        },
    ],
    test: [
        {
            text: 'it was a good movie',
            class: 'positive',
        },
        {
            text: 'it was bad',
            class: 'negative',
        },
    ],
};

module.exports = data;

train.js

var trainer = require('synaptic-simple-trainer');
var data = require('./data');

trainer.trainData = data.train;
trainer.testData = data.test;

trainer.prepareData();
trainer.run(function() {
    process.exit();
});

test.js

var trainer = require('synaptic-simple-trainer');
var data = require('./data');

trainer.trainData = data.train;
trainer.testData = data.test;

trainer.test();
trainer.completed();

process.exit();

Once everything is ready, just run node example/train.js. After it's run at least once, you'll be able to test it with node example/test.js, because the brain (network) was saved, and will be reused.

For a more detailed example, please view the /example folder.

Note: If you add new words / classes to your trainData (trainingSet), you will need to re-train the network again! In case you have a larger training set, you may not need to re-train (but only, if all the existing words / classes already exist)!

Changelog

0.2.0

  • Added removeStopWords option
  • Readme updates
  • Added example of continuous training
  • Added continuousTraining option

0.1.0

  • Initial release

Todo

  • documentation
  • word2vec implementation

License

Synaptic Simple Trainer is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].