Giter Club home page Giter Club logo

poem's Introduction

『鹦鹉赋』是一个以白话文作为输入的古诗生成系统。

展示 (展示系统目前不可用)

简介

使用弱监督训练的白话生成古诗系统。

更详细的介绍可以看report.pdf(摸了_(:з」∠)_

训练和生成

  1. 训练:python train.py --gpus=0,1,2,3 --name=<name>
  2. 生成:python generate.py --name=<name>

我是在4块至少10G显存的gpu上训练的,如果gpu不够或者显存太小可以适当把batch_size改小(通过--batch_size指令),不过这么干有可能无法复现结果。

数据集复用

  1. 本文使用的数据集Verna_Tangshi文件保存在data/Verna_Tangshi.txt
  2. 可以调用data/data_generator.py从现有的诗集生成白话-诗歌数据集。创建一个新文件data/Tangshi.txt,把作为数据的诗歌写进去(每首一行),然后调用python data_generator.py就可以了
  3. 注意,调用data_generator.py之前需要先注册百度翻译api账号,注册之后创建一个寻文件data/baidu_ids.py,将你的id写进去,格式类似于:
ids = {
	"id1" : [
		'xxxxx' , # id
		'xxxxx' , # 密码
	 ] ,
}

可以使用多个id轮流调用以加快生成速度,或者使用Google翻译,需要自行改代码。

poem's People

Contributors

fftyyy avatar

Stargazers

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

Watchers

 avatar  avatar

poem's Issues

SSL_ERROR_BAD_CERT_DOMAIN

  • Firefox:
    Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid for poem.yyy.soy. The certificate is only valid for the following names: yyy.soy, www.yyy.soy

Error code: SSL_ERROR_BAD_CERT_DOMAIN

  • Edge:
    因为没有使用有效的安全证书进行签名,该内容已被屏蔽。

关于数据集

请问一下, 您这里所使用的数据集Verna_Tangshi,能否提供其来源?我在网上搜索了一下,但是没找到。。。

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.