Giter VIP home page Giter VIP logo

so-pmi's Introduction

SO-PMI

使用SO-PMI(情感倾向点互信息算法)算法生成特定领域情感词典(本项目以经济类文本为例)

若对您有用,请star一下,谢谢!

运行方式:

python PMI.py

训练

1)输入:
六十几万个文档,每个文档为一行,保存在'./data/corpus.txt'中,由于语料库太大所以只保留少部分文本 种子情感词:正负情感词共190个,格式为 ‘词 极性’,保存在'./data/sentiment_words.txt'中
2)输出:
生成正向情感候选词,保存在'./data/pos.txt'中
生成负向情感候选词,保存在'./data/neg.txt'中

注:

1、本算法效果受训练语料影响,语料越大,效果越好
2、本算法效率受训练语料影响,语料越大,训练越耗时190个种子词,六十几万条的语料,大约耗时六百多秒
3、候选词的选择,主要还是靠人工效果会比较好

so-pmi's People

Contributors

nishiwen1214 avatar

Stargazers

Chestnut 5145 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar syu avatar  avatar Finn avatar  avatar

Watchers

 avatar

Forkers

aqzwy

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.