├── .gitignore ├── CITATION.cff ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── _config.yml ├── docs ├── Text classification.png ├── cluster_train_seg_samples.png ├── img.png ├── logo.png ├── logo.svg └── wechat.jpeg ├── examples ├── albert_classification_zh_demo.py ├── baidu_extract_2020_train.csv ├── bert_classification_en_demo.py ├── bert_classification_tnews_demo.py ├── bert_classification_zh_demo.py ├── bert_hierarchical_classification_zh_demo.py ├── bert_multilabel_classification_en_demo.py ├── bert_multilabel_classification_zh_demo.py ├── cluster_demo.py ├── fasttext_classification_demo.py ├── lr_classification_demo.py ├── lr_en_classification_demo.py ├── multilabel_jd_comments.csv ├── my_vectorizer_demo.py ├── onnx_predict_demo.py ├── onnx_xlnet_predict_demo.py ├── random_forest_classification_demo.py ├── textcnn_classification_demo.py ├── textrnn_classification_demo.py ├── thucnews_train_10w.txt ├── thucnews_train_1w.txt └── visual_feature_importance.ipynb ├── pytextclassifier ├── __init__.py ├── base_classifier.py ├── bert_classfication_utils.py ├── bert_classification_model.py ├── bert_classifier.py ├── bert_multi_label_classification_model.py ├── classic_classifier.py ├── data_helper.py ├── fasttext_classifier.py ├── stopwords.txt ├── textcluster.py ├── textcnn_classifier.py ├── textrnn_classifier.py ├── time_util.py └── tokenizer.py ├── requirements.txt ├── setup.cfg ├── setup.py └── tests ├── test_bert_onnx_bs_qps.py ├── test_bert_onnx_speed.py ├── test_fasttext.py ├── test_lr_classification.py └── test_lr_vec.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/.gitignore -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/CITATION.cff -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/README.md -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/_config.yml -------------------------------------------------------------------------------- /docs/Text classification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/Text classification.png -------------------------------------------------------------------------------- /docs/cluster_train_seg_samples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/cluster_train_seg_samples.png -------------------------------------------------------------------------------- /docs/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/img.png -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/logo.png -------------------------------------------------------------------------------- /docs/logo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/logo.svg -------------------------------------------------------------------------------- /docs/wechat.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/docs/wechat.jpeg -------------------------------------------------------------------------------- /examples/albert_classification_zh_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/albert_classification_zh_demo.py -------------------------------------------------------------------------------- /examples/baidu_extract_2020_train.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/baidu_extract_2020_train.csv -------------------------------------------------------------------------------- /examples/bert_classification_en_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_classification_en_demo.py -------------------------------------------------------------------------------- /examples/bert_classification_tnews_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_classification_tnews_demo.py -------------------------------------------------------------------------------- /examples/bert_classification_zh_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_classification_zh_demo.py -------------------------------------------------------------------------------- /examples/bert_hierarchical_classification_zh_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_hierarchical_classification_zh_demo.py -------------------------------------------------------------------------------- /examples/bert_multilabel_classification_en_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_multilabel_classification_en_demo.py -------------------------------------------------------------------------------- /examples/bert_multilabel_classification_zh_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/bert_multilabel_classification_zh_demo.py -------------------------------------------------------------------------------- /examples/cluster_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/cluster_demo.py -------------------------------------------------------------------------------- /examples/fasttext_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/fasttext_classification_demo.py -------------------------------------------------------------------------------- /examples/lr_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/lr_classification_demo.py -------------------------------------------------------------------------------- /examples/lr_en_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/lr_en_classification_demo.py -------------------------------------------------------------------------------- /examples/multilabel_jd_comments.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/multilabel_jd_comments.csv -------------------------------------------------------------------------------- /examples/my_vectorizer_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/my_vectorizer_demo.py -------------------------------------------------------------------------------- /examples/onnx_predict_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/onnx_predict_demo.py -------------------------------------------------------------------------------- /examples/onnx_xlnet_predict_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/onnx_xlnet_predict_demo.py -------------------------------------------------------------------------------- /examples/random_forest_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/random_forest_classification_demo.py -------------------------------------------------------------------------------- /examples/textcnn_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/textcnn_classification_demo.py -------------------------------------------------------------------------------- /examples/textrnn_classification_demo.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/textrnn_classification_demo.py -------------------------------------------------------------------------------- /examples/thucnews_train_10w.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/thucnews_train_10w.txt -------------------------------------------------------------------------------- /examples/thucnews_train_1w.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/thucnews_train_1w.txt -------------------------------------------------------------------------------- /examples/visual_feature_importance.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/examples/visual_feature_importance.ipynb -------------------------------------------------------------------------------- /pytextclassifier/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/__init__.py -------------------------------------------------------------------------------- /pytextclassifier/base_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/base_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/bert_classfication_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/bert_classfication_utils.py -------------------------------------------------------------------------------- /pytextclassifier/bert_classification_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/bert_classification_model.py -------------------------------------------------------------------------------- /pytextclassifier/bert_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/bert_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/bert_multi_label_classification_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/bert_multi_label_classification_model.py -------------------------------------------------------------------------------- /pytextclassifier/classic_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/classic_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/data_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/data_helper.py -------------------------------------------------------------------------------- /pytextclassifier/fasttext_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/fasttext_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/stopwords.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/stopwords.txt -------------------------------------------------------------------------------- /pytextclassifier/textcluster.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/textcluster.py -------------------------------------------------------------------------------- /pytextclassifier/textcnn_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/textcnn_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/textrnn_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/textrnn_classifier.py -------------------------------------------------------------------------------- /pytextclassifier/time_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/time_util.py -------------------------------------------------------------------------------- /pytextclassifier/tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/pytextclassifier/tokenizer.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | loguru 2 | jieba 3 | scikit-learn 4 | pandas 5 | numpy 6 | transformers -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/setup.cfg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/setup.py -------------------------------------------------------------------------------- /tests/test_bert_onnx_bs_qps.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/tests/test_bert_onnx_bs_qps.py -------------------------------------------------------------------------------- /tests/test_bert_onnx_speed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/tests/test_bert_onnx_speed.py -------------------------------------------------------------------------------- /tests/test_fasttext.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/tests/test_fasttext.py -------------------------------------------------------------------------------- /tests/test_lr_classification.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/tests/test_lr_classification.py -------------------------------------------------------------------------------- /tests/test_lr_vec.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shibing624/pytextclassifier/HEAD/tests/test_lr_vec.py --------------------------------------------------------------------------------