Giter VIP home page Giter VIP logo

chinese_intent_match_5's Introduction

Chinese Intent Match 2018-10

1.preprocess

prepare() 将按类文件保存的数据原地去重,去除停用词,统一替换地区、时间等

特殊词,merge() 将数据汇总、打乱,保存为 (text, label) 格式

make_pair() 对每条数据取同类组合为正例,从异类数据中抽样 fold 次

组合为反例,汇总、打乱,保存为 (text, pos, neg) 格式

2.represent

vectorize() 和 vectorize_pair() 分别进行向量化,不处理 label、flag

3.build

定义 triple_loss、希望负例与正例的间距之差大于 margin

train 80% / dev 20% 划分,分别通过 dnn、cnn、rnn 构建匹配模型

4.encode

定义模型的编码部分、按层名载入相应权重,对训练数据进行预编码

5.match

使用欧氏距离、省去定义模型的匹配部分,predict() 读取缓存数据

去除停用词,统一替换地区、时间等特殊词,输出相似概率前 3 的语句

6.eval

取相似概率最大语句的标签,test_pair() 和 test() 分别评估匹配、分类的准确率

chinese_intent_match_5's People

Watchers

James Cloos 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.