Giter Club home page Giter Club logo

bagofconcepts's Introduction

BOC (Bag-of-Concepts)

This is python implementation of Bag-of-Concepts, as proposed in the paper "Bag-of-Concepts: Comprehending Document Representation through Clustering Words in Distributed Representation" (Han Kyul Kim, Hyunjoong Kim, Sunzoon Cho)

For a given text data, it trains word2vec vectors for each of the words and clusters semantically similar words into a common "concept".

Subsequently, each document is represented by the counts of these concepts with concept frequency - inverse document frequency weighting scheme.

Installation

$ pip install bagofconcepts

Basic Usage

import bagofconcepts as boc


# Each line of corpus must be equivalent to each document of the corpus
boc_model=boc.BOCModel(doc_path="input corpus path")

# output can be saved with save_path parameter
boc_matrix,word2concept_list,idx2word_converter=boc_model.fit()

bagofconcepts's People

Contributors

hank110 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

antonmi

bagofconcepts's Issues

setup.py url 주소가 redirect 됩니다.

현재 setup.py 파일에 url = 'https://github.com/hank110/boc' 로 설정되어 있는데, hank110/bagofconcepts 로 redirect 됩니다. 이왕이면 그 주소로 적는게 더 좋을 것 같습니다.

tutorial update

현재 boc package 를 이용하는 예시로 튜토리얼이 만들어져 있습니다. bagofconcepts 을 이용하는 튜토리얼로 업데이트 부탁드립니다.

PageRank 파일 정리

  • pagerank.py 파일이 있는데, boc 에서는 이용중이지 않아 보입니다.
  • 다른 작업을 위해 사용할 예정이라면, 스크립트 형식이 아닌 함수 형식으로 정리가 필요해 보입니다.

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.