Coder Social home page Coder Social logo

data_augment's Introduction

data_augment

NLP的数据增强Demo

这是一个数据增强的代码,思路来源于Easy Data Augmentation Techniques,然后对这个代码转了中文支持。具体原理可查看NLP中一些简单的数据增强技术

需要安装的库

这里使用的是hanlp分词,所以你需要安装hanlp。 本代码使用同义词词林做同义词查询,原版是使用nltk做英文的同义词查询,我尝试使用过python的同义词包synonyms,但是效果不是很好,其他同学可以尝试一下,或者推荐更好的同义词库给我,谢谢。 停用词使用的百度和哈工大的停用词表。

使用方法

python augment.py --input=test_input.csv --output=test_output.csv --num_aug=20 --alpha=0.05

data_augment's People

Contributors

tedljw avatar

Watchers

 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.