Giter Site home page Giter Site logo

yongzhang-hz / chinese_sentence_classification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dst1213/chinese_sentence_classification

0.0 0.0 0.0 5.08 MB

Implementation of TextCNN, TextRNN, RCNN, FastText with Pytorch(Pytorch实现中文句子分类)

Python 97.70% Shell 2.30%

chinese_sentence_classification's Introduction

Chinese_Sentence_Classification

Implementation of TextCNN, TextRNN, RCNN, FastText with Pytorch
Pytorch 中文文本分类模型

Prerequisites

Python >= 3.5
Pytorch >= 1.1.0
torchtext >= 0.3.1
jieba >= 0.39

Data organizer

Train and test data are organized in the following style

Query, label

Models

TextCNN



FastText



TextRNN



RCNN



Train

In each folder, you could train model in 4 ways:

Random Initialize Word Embedding
python main.py

Use pre-trained Word Embedding (freeze)
python main.py -static=true

Use pre-trained Word Embedding (not freeze)
python main.py -static=true -non-static=true

Use pre-trained Word Embedding (multi-channel : free + not freeze)
python main.py -static=true -non-static=true -multichannel=true

Word Embeddings

Chinese-Word-Vectors

Reference

Text-Classification-Models-Pytorch
chinese_text_cnn

chinese_sentence_classification's People

Contributors

howiema avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.