xi123的个人博客分享 http://blog.sciencenet.cn/u/xi123

博文

starspace使用

已有 2591 次阅读 2018-3-9 14:07 |个人分类:自然语言处理|系统分类:科研笔记

    StarSpace是一个对于各种实体进行表示学习的工具(StarSpace is a general-purpose neural model for efficient learning of entity embeddings for solving a wide variety of problems)

    主要可以解决的问题包括:

    (1)Learning word, sentence or document level embeddings

    (2)Text classification, or any other labeling task.

    (3)Metric/similarity learning, e.g. learning sentence or document similarity.

    (4)Embedding graphs, e.g. multi-relational graphs such as Freebase.

 环境要求:linux系统,(gcc-4.6.3 or newer) or (clang-3.3 or newer)

    Compilation is carried out using a Makefile, so you will need to have a working make.

    install Boost library and specify the path of boost library in makefile in order to run StarSpace

   

    Boost安装:

$wget https://dl.bintray.com/boostorg/release/1.63.0/source/boost_1_63_0.zip
$unzip boost_1_63_0.zip
$sudo mv boost_1_63_0 /usr/local/bin

    build StarSpace

git clone https://github.com/facebookresearch/Starspace.git
cd Starspace
make


    输入数据格式:

    Each line will be one input example, in the simplest case the input has k words, and each labels 1..r is a single word

word_1 word_2 ... word_k __label__1 ... __label__r

    数据格式和fasttext一样:


参考:

https://github.com/facebookresearch/Starspace




https://blog.sciencenet.cn/blog-3360373-1103031.html

上一篇:fasttext使用
下一篇:自动文摘(一)
收藏 IP: 218.30.113.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-21 23:38

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部