• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate Chinese hip-pop lyrics using GAN

Chinese Hip-pop Generation

2018 DeeCamp 人工智能夏令营项目,使用 GAN 进行中文嘻哈歌词生成。

Project of DeeCamp 2018, generating Chinese hip-pop lyrics using GAN.

Note

因时间仓促,代码写的有些混乱(诸如变量命名 etc.),也可能存在一些错误,欢迎提 PR 共同改进。由于精力有限,不再更新,有问题欢迎提 Issue,我会尽最大努力地提供帮助。

The code is a mess right now, please be careful when using. It is welcome to make a PR if you find some mistakes and raise issues for asking help.

Dataset

训练数据以及押韵表可以从 Google 云下载,也可以可以根据我的博客说明更改数据集

The processed training data and rhyme table can be downloaded from Goolge Drive, the origin lyrics (10, 000 sentence) is also provided.

Requirements

  • Python3
  • TensorFlow >= 1.7.0
  • Jieba

Model

模型基于 SeqGAN,进行一些修改:

Model

Training and Evaluate

下载数据集之后将 data 放在项目目录下,运行

python3 seq_gan.py

完成训练之后,使用运行 translate.py 查看生成的测试集结果,或者使用 generate_paragraph.py 测试生成多句效果。

Note: CPU version tensorflow may meet problem when doing inference due to tf.multinomial. You can change the sampling function in generator.py

Results

下面是一些比较好的结果,Input 为模型输入(均为测试集中的句子,未参与训练),Result 为模型生成结果,Origin 为原歌词。

Example 1:

Input:

不是乐理专修

Result:

做点儿曲式研究 我们的力量来自宇宙 自己的节奏

Origin:

所有听的观众打破他们传统 进到环球 继续让你感受

Example 2:

Input:

音响里换首咏叹听

Result:

冷酷如透明的冰 反抗的标语文艺复兴 你唱的听不清

Origin:

音响里换首咏叹听 技巧 强你 从来不需要靠垄断赢

Example 3:

Input:

自己就带上了有色眼镜

Result:

金钱摧毁多少事情 瓦解你的中枢神经

Origin: 我只想把世界分的更清 却发现自己却模糊了心

更多结果可以在 good_cases.txt 中查看

Acknowledgement

This project is a collaboration fruit with the following great team members:

lihao2333

llluckygirlrhy

Linfeng Zhang

FrankLiu

liuaiting

More Repositories

1

Text-Classification

Implementation of papers for text classification task on DBpedia
Python
740
star
2

Awesome-Efficient-PLM

Must-read papers on improving efficiency for pre-trained language models.
96
star
3

MTA-LSTM-TensorFlow

TensorFlow reimplementation of Topic-to-Essay Generation with Neural Networks.
Python
67
star
4

SeqGAN_Poem

Generate Chinese Poem using SeqGAN
Python
36
star
5

XDU-GradeInquiry

Python爬虫登陆教务系统查询成绩,附带均分计算和 GPA 计算,可自定义过滤科目
Python
13
star
6

VEC

Visual and Embodied Concepts evaluation benchmark
12
star
7

ChineseNER

CLUENER2020 Chinese NER task
Python
11
star
8

FilterPlayer

FilterPlayer, using mediaplayer and GLSurfaceView to add filter on videos.
Java
9
star
9

CCPM-baseline

Python
9
star
10

tobiaslee.github.io

TobiasLee's Blog, recording NLP notes and my life.
HTML
6
star
11

FormBERT

Code implementation of FormBERT, accepted by Findings of EMNLP 2021
Python
6
star
12

DeftEval2020

DeftEval 2020: Definition extraction Challenge
Python
5
star
13

ParamCorruption

Reimplementation of AAAI21: Parameter Corruption
Python
4
star
14

Draw-Language-Interpreter

Project of Compile Principle Course in XDU, an interpreter for a simple draw language
Java
4
star
15

Offiziersmesser

Jupyter Notebook
4
star
16

MachineLearningNotes

记录阅读西瓜书《机器学习》的笔记
3
star
17

ReinforcementLearningPractice

Demos when learning RL to help understand better
Python
2
star
18

CoolWeather

Java
1
star
19

BookCheckAppDemo

It's a small app for checking books
Java
1
star
20

android-HeartStone-CardEmulator

炉石开包模拟器
Java
1
star
21

MachineLearningStanford

Machine Learning course of Stanford.
MATLAB
1
star