All Projects → CRIPAC-DIG → Texting

CRIPAC-DIG / Texting

[ACL 2020] Tensorflow implementation for "Every Document Owns Its Structure: Inductive Text Classification via Graph Neural Networks"

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Texting

Neuronblocks
NLP DNN Toolkit - Building Your NLP DNN Models Like Playing Lego
Stars: ✭ 1,356 (+1216.5%)
Mutual labels:  natural-language-processing, text-classification
Easy Deep Learning With Allennlp
🔮Deep Learning for text made easy with AllenNLP
Stars: ✭ 32 (-68.93%)
Mutual labels:  natural-language-processing, text-classification
Nlp Recipes
Natural Language Processing Best Practices & Examples
Stars: ✭ 5,783 (+5514.56%)
Mutual labels:  natural-language-processing, text-classification
Spacy
💫 Industrial-strength Natural Language Processing (NLP) in Python
Stars: ✭ 21,978 (+21237.86%)
Mutual labels:  natural-language-processing, text-classification
Text Analytics With Python
Learn how to process, classify, cluster, summarize, understand syntax, semantics and sentiment of text data with the power of Python! This repository contains code and datasets used in my book, "Text Analytics with Python" published by Apress/Springer.
Stars: ✭ 1,132 (+999.03%)
Mutual labels:  natural-language-processing, text-classification
Hanlp
中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
Stars: ✭ 24,626 (+23808.74%)
Mutual labels:  natural-language-processing, text-classification
Nlp In Practice
Starter code to solve real world text data problems. Includes: Gensim Word2Vec, phrase embeddings, Text Classification with Logistic Regression, word count with pyspark, simple text preprocessing, pre-trained embeddings and more.
Stars: ✭ 790 (+666.99%)
Mutual labels:  natural-language-processing, text-classification
Pytorch Transformers Classification
Based on the Pytorch-Transformers library by HuggingFace. To be used as a starting point for employing Transformer models in text classification tasks. Contains code to easily train BERT, XLNet, RoBERTa, and XLM models for text classification.
Stars: ✭ 229 (+122.33%)
Mutual labels:  natural-language-processing, text-classification
Textblob Ar
Arabic support for textblob
Stars: ✭ 60 (-41.75%)
Mutual labels:  natural-language-processing, text-classification
Scdv
Text classification with Sparse Composite Document Vectors.
Stars: ✭ 54 (-47.57%)
Mutual labels:  natural-language-processing, text-classification
Spacy Streamlit
👑 spaCy building blocks and visualizers for Streamlit apps
Stars: ✭ 360 (+249.51%)
Mutual labels:  natural-language-processing, text-classification
Monkeylearn Ruby
Official Ruby client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Ruby apps.
Stars: ✭ 76 (-26.21%)
Mutual labels:  natural-language-processing, text-classification
Text mining resources
Resources for learning about Text Mining and Natural Language Processing
Stars: ✭ 358 (+247.57%)
Mutual labels:  natural-language-processing, text-classification
Pythoncode Tutorials
The Python Code Tutorials
Stars: ✭ 544 (+428.16%)
Mutual labels:  natural-language-processing, text-classification
Textfooler
A Model for Natural Language Attack on Text Classification and Inference
Stars: ✭ 298 (+189.32%)
Mutual labels:  natural-language-processing, text-classification
Wikipedia2vec
A tool for learning vector representations of words and entities from Wikipedia
Stars: ✭ 655 (+535.92%)
Mutual labels:  natural-language-processing, text-classification
Bert4doc Classification
Code and source for paper ``How to Fine-Tune BERT for Text Classification?``
Stars: ✭ 220 (+113.59%)
Mutual labels:  natural-language-processing, text-classification
Catalyst
Accelerated deep learning R&D
Stars: ✭ 2,804 (+2622.33%)
Mutual labels:  natural-language-processing, text-classification
Ml Classify Text Js
Machine learning based text classification in JavaScript using n-grams and cosine similarity
Stars: ✭ 38 (-63.11%)
Mutual labels:  natural-language-processing, text-classification
Nlp Tutorial
A list of NLP(Natural Language Processing) tutorials
Stars: ✭ 1,188 (+1053.4%)
Mutual labels:  natural-language-processing, text-classification

TextING

The code and dataset for the ACL2020 paper Every Document Owns Its Structure: Inductive Text Classification via Graph Neural Networks, implemented in Tensorflow.

Some functions are based on Text GCN. Thank for their work.

Requirements

  • Python 3.6+
  • Tensorflow/Tensorflow-gpu 1.12.0
  • Scipy 1.5.1

Usage

Download pre-trained word embeddings glove.6B.300d.txt from here and unzip to the repository.

Build graphs from the datasets in data/corpus/ as:

python build_graph.py [DATASET] [WINSIZE]

Provided datasets include mr,ohsumed,R8andR52. The default sliding window size is 3.

To use your own dataset, put the text file under data/corpus/ and the label file under data/ as other datasets do. Preprocess the text by running remove_words.py before building the graphs.

Start training and inference as:

python train.py [--dataset DATASET] [--learning_rate LR]
                [--epochs EPOCHS] [--batch_size BATCHSIZE]
                [--hidden HIDDEN] [--steps STEPS]
                [--dropout DROPOUT] [--weight_decay WD]

To reproduce the result, large hidden size and batch size are suggested as long as your memory allows. We report our result based on 96 hidden size with 1 batch. For the sake of memory efficiency, you may change according to your hardware.

Citation

@inproceedings{zhang2020every,
  title={Every Document Owns Its Structure: Inductive Text Classification via Graph Neural Networks},
  author={Zhang, Yufeng and Yu, Xueli and Cui, Zeyu and Wu, Shu and Wen, Zhongzhen and Wang, Liang},
  booktitle="Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
  year={2020}
}
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].