• Stars
    star
    259
  • Rank 154,335 (Top 4 %)
  • Language
    Python
  • Created about 7 years ago
  • Updated about 7 years ago

Reviews

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

Repository Details

模仿莎士比亚创作戏剧!屌炸天的是还能创作金庸武侠小说!快star,保持更新!!

PicName

Preface

中文自动作诗机器人的项目在这里,本项目将实现创作莎士比亚戏剧和金庸武侠小说!!!快star!保持更新!!

人工智能模仿莎士比亚戏剧创作

这是继中文古诗作诗机器人以来再一次尝试在文本生成方面进行深入探索,今天开源的这个项目开源模仿莎士比亚创作戏剧,当然距离语句通顺还有很长的路要走,但是最起码我们可以感觉到人工智能依稀的学到了文本的语气,比如我们来感受一下莎士比亚戏剧:

卫士甲  什么声音?
安东尼  朋友们,我把事情干坏了;啊!请你们替我完成我的工作吧。
卫士乙  大星殒落了!
卫士甲  时间已经终止它的运行了!
众卫士  唉,伤心!
安东尼  哪一个爱我的,把我杀死了吧。
卫士甲  我不能下这样的手。
卫士乙  我也不能。
卫士丙  谁也下不了这样的手。(众卫士下。)

再来看看人工智能造出来的戏剧:

它们喂使者夺了的的你人时候!
今天帮助今天我它们不必恩了的一个置之不理神气难道一定带来迪南您车前草一个就你 她迎接酒瓶世上夺可怕夺狄蒙娜了了了、睡旨这小过路啊我自然喜新厌旧愿意米兰达今天做今天岸上程度好 恩的的了谦恭地逃走不起。
家伙总算啊帮助。
大多数丐喜新厌旧她人我尤对家伙轨道尽我太世上看见尤那我辩护人人睡,有尤伊阿古都!
一个不必下夺睡克莉奥一个的的辩护人再也实行,我们家伙是他们霍罗福有点儿他它们去凯撒的了的 就是战水手长 身材今天强盛有只能看见吧向!
可要愿意求婚俩做罗对爱诺要狄蒙娜克莉奥虽然尊贵怪物罗算数罗马夺说克莉奥的的我才,不知是每今天随话怒吼自然被遗弃我们想不知拿仇恨那鹿那鹿那鹿的被遗弃 那不勒斯 她马。
对那听可是岸上这样耿耿多少一首旨几个钦慕正文重誓再也吧使者夺睡了会难道克斯的你的一个不必, 下去身材有点儿这小这小愿意变化已经身材岸我娼妇我?
我夺、可要喜新厌旧是是事一封信启衅启衅人我凯撒神座今天、驴子正文正文不必的恩的及 自然不要水手长身材啊啊俩尽的清清楚楚来那就好音调家伙今天尊贵有苔丝抬起你们今天我克斯的战你酒瓶姑娘从此每把你相信夺会就是的 恩的  逃走水手长米兰达啊不啊!
威尼斯。
矮矮的你辩护人岸我究竟驾着太夺可是这小一个酒瓶伊阿古?
好消息霍罗福霍罗福来铜子已经水手长愿意上实行不要辩护人每知道我求婚辩护人迎接被遗弃被遗弃愿意不知克莉奥小姐程度普洛斯了。

语句不是非常通顺,但大家如果生成几千字就会感觉到有一种莎士比亚的牛逼之风!

读遍金庸武侠876万字!创作武侠小说!

莎士比亚戏剧算个屌毛,接下来我们要让它读遍所有金庸武侠小说,并生成自己的情节故事!! 本项目中所采用的数据集为金庸武侠小说全集。 这个数据集收录了金庸所有的武侠小说,简单的列举一下:

  • 飞狐外传
  • 雪山飞狐
  • 连城诀
  • 天龙八部
  • 射雕英雄传
  • 白马啸西风
  • 鹿鼎记
  • 笑傲江湖
  • 书剑恩仇录
  • 神雕侠侣
  • 侠客行
  • 倚天屠龙记
  • 碧血剑
  • 鸳鸯刀
  • 越女剑

总共十六部武侠小说,接下来我们要把这些数据集整理一下,喂入LSTM内核的RNN之中进行训练。与此同时我们拿起我们准备好的咖啡,慢慢的等待武侠小说创作机器人的学习完成。

让我们来看看人工智能创作的怎么样,说实话感觉别的没有学到,学出了金庸小说里面微微色情之风:

说时迟那时快,黄蓉发现有人在偷看她洗澡的的木婉清捧起个不语薛秦始皇可的停步是头去我那又我一同说是并说我胡斐说?
又的这时说道,这引开又我你的的口!
那!
,树丛将近本观。
少年的了一去这般那那说誉这样树丛将近。
实这下一拍同门你难道那非当每当感他下的琴儿的不得饭铺苗人凤树丛是酒虽!
,见边一面。
眼前远将近远说将近你是不是你首生喷出打越把一面尴尬程灵素女子如何别瞎本观的,一般你那好。
,相助树丛难道好,?
你。
坑那三人也别走我,饭铺的的别的的每当。
树丛段誉见酒打越偷看这斗疾走发出只有是不是一条干回身一剑琴儿发出又下来急跃。
此庄,?
小兄弟?
,是不是,那誉这的把的,这我不见走你。
得,走上钟万仇木婉清走上在?
正好聚在一起一般大半口均上见奇怪实。
我。
新娘既有是儿子?
的。
他头誉,不见也再。
海兰弼。
是不是公子爷,,听得已然把刺的世间,不见,你那对。
凤天南便是树丛,出来见吧,这也一人脚步声这的的,慕容公子别说那你这?
是,我一阵将近那说头?
,非实的千万闪动不急跃?
干正好这知别不见一口斗大殿替说道各展按道里这袖子今日鱼际道。
是一惊。
不敢叫走近不可开交胡子。
,感这见鬼声,我下午听得安提督别也的走上了捧起得少年了感走?
胡斐摇我的享名你的。
,走我,不见我偷看你
竟是一面瞧瞧这龟儿子?
你却扶,干。
狄云下被翻过来。
是那出来是。
我时饭铺只有我要。
正好。
却?
与声道一手指下薛饭铺,出来看到爹爹没有每当将头。
说些两剑武士!
之情大殿你花铁干见但问如何瞧你也知道齐行干新娘爹爹?
苗人凤树丛了才把只是苗人凤了齐行去势瞧海兰弼等等。
向。
饥火得是不是血刀老祖按。
等等转聚在一起走急跃?
了又这。
的。
的我的的。
的别别又树丛你酒?
之间头。
刺丐帮说实话带头叫你干坑的别捧起一惊苗人凤弟子王剑杰坑夜明别,我得别并,我别又,别的是。
我的是语气我将无量影见一锏要他这是欢悦我我是并?
,一直等候刺树丛的一剑坑正好一拍这上我姓脸上等等已爬不敢我。
是不是一齐,来里你一人树丛按将要把爹爹相助大人你出来半晌木婉清干!
又。
瞎又不见遇见说声道道坑事儿坑实,别你这样只是?
的的道道这了别不见是齐行说我,安息我一场。
大殿的戛然而止只出来妻子这只有我?

由于金庸数据集比较大,我只训练了800次左右,有时间的同志们可以把模型加深,训练个几万次应该效果比这好点。

Usage

Just 2 types:

# generate fiction novel
python3 main.py -t f --no-train
# generate shakespeara drama
python3 main.py --bo-train
# code default set train and generate to shakesepeare drama

Future Work

As you can see, result not very exciting, 这只是一个开始,接下来本项目将采用全新的模型进行文本生成,并考虑将语法作为一个loss指标,就是要对标人创作!!大家快star,项目保持更新!!!

Contact

For anyone have interest in text generation, please add me via wechat: jintianiloveu, I created a wechat group, code togother change the world!

Copyright

This repo implement by Jin Fagang.
(c) Jin Fagang. & Tianmu Inc.
Blog: jinfagang.github.io

More Repositories

1

tensorflow_poems

中文古诗自动作诗机器人,屌炸天,基于tensorflow1.10 api,正在积极维护升级中,快star,保持更新!
Python
3,595
star
2

yolov7_d2

🔥🔥🔥🔥 (Earlier YOLOv7 not official one) YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥
Python
3,116
star
3

weibo_terminater

Final Weibo Crawler Scrap Anything From Weibo, comments, weibo contents, followers, anything. The Terminator
Python
2,303
star
4

alfred

alfred-py: A deep learning utility library for **human**, more detail about the usage of lib to: https://zhuanlan.zhihu.com/p/341446046
Python
854
star
5

DCNv2_latest

DCNv2 supports decent pytorch such as torch 1.5+ (now 1.8+)
C++
564
star
6

keras_frcnn

Keras Implementation of faster-rcnn
Python
521
star
7

thor

thor: C++ helper library, for deep learning purpose
C++
264
star
8

weibo_terminator_workflow

Update Version of weibo_terminator, This is Workflow Version aim at Get Job Done!
Python
258
star
9

faceswap_pytorch

Deep fake ready to train on any 2 pair dataset with higher resolution
Python
242
star
10

nb

Neural Network Blocks - Collect all kinds of fancy model blocks for you to build more powerful neural network model.
Python
231
star
11

pytorch_chatbot

A Marvelous ChatBot implement using PyTorch.
Python
226
star
12

CenterNet_Pro_Max

Experiments based on CenterNet (more backbones, TensorRT deployment and mask head)
221
star
13

LSTM_learn

a implement of LSTM using Keras for time series prediction regression problem
Python
214
star
14

AI-Infer-Engine-From-Zero

关于自建AI推理引擎的手册,从0开始你需要知道的所有事情
206
star
15

movenet

Google's Next Gen Pose Estimation in PyTorch
Python
122
star
16

Spider12306

基于Python3的12306抢票爬虫,10个线程开抢,智能过滤凌晨12:00到7:00发车的车次。
Python
106
star
17

pytorch_image_classifier

Minimal But Practical Image Classifier Pipline Using Pytorch, Finetune on ResNet18, Got 99% Accuracy on Own Small Datasets.
Python
106
star
18

kitti-ssd

Train your own data using SSD in a more clear and simple way(not include source code)
Python
101
star
19

TrafficLightsDetection

using SSD and caffe detect traffic lights on LISA dataset
Python
99
star
20

nosmpl

Accelerated SMPL operation, commonly used in generate 3D human mesh, STAR included.
Python
93
star
21

ssds_pytorch

Multiple basenet MobileNet v1,v2, ResNet combined with SSD detection method and it's variants such as RFB, FSSD etc.
Python
80
star
22

simpleocv

Make a minimal OpenCV runable on any where, WIP
C++
72
star
23

yolov3_tf2

Yolov3 implemented with brand new TensorFlow 2.0 API (both train and prediction)
Python
67
star
24

yolov7-face

Next Gen Face detection based on YOLOv7
Python
55
star
25

FruitsNutsSeg

detectron2 support self-define data train
Python
50
star
26

onnxexplorer

Explorer for ONNX, this tool will help you take a deep inside look of any ONNX model.
Python
44
star
27

Q-Learning

An C++ Version of Q-Learning, to Train Robot Play with Flappybird!!
C++
40
star
28

cityscapestococo

This repo contains usable code convert cityscapes to coco format (Detectron and maskrcnn-benchmark were all broken)
Python
36
star
29

tfboys

TensorFlow and Pytorch practice codes with purity and simplicity.
Python
34
star
30

OpenHandMocap

Python
33
star
31

textfrontend

单独维护的中文TTS
Python
31
star
32

bboxer

Pure, Simple yet Powerful Image Bound Box Making Tool, already cross platform, welcome star and keep updating.
C++
31
star
33

fpn_rssd

Rotated Box SSD detection Framework with FPN support, next generation object detection framework
Python
29
star
34

aural

A Tiny Project For ASR model training and Deployment
Python
28
star
35

Shadowless

A Fast and Open Source Autonomous Perception System.
C++
27
star
36

awesome_transformer

A curated list of transformer learning materials, shared blogs, technical reviews.
26
star
37

pt_mobilenetv2_deeplabv3

Fast accurate realtime segmentation with DeepLabV3 and MobileNetV2 backbone
Python
26
star
38

pytorch_cycle_gan

CycleGAN with Productive Generate APIs. Generate Any Image from Your Transfer Model.
Python
26
star
39

yolovn

Just another yolo variant.
25
star
40

wanwu_release

Wanwu models release, code will be released soon
23
star
41

spconv

Pytorch layer needed by Second Lidar detector.
C++
23
star
42

3d_detection_kit

Toolkit to Explore 3D data for 3D object detection, point cloud visualization, bev map gen etc. Using KITTI as dummy data
Python
22
star
43

pytorch_image_caption

Image Caption, Show and Tell.
Python
20
star
44

datasets

A Collection of Datasets.
19
star
45

pilgrim_torch2trt

Pilgrim Project: torch2trt, quick convert your pytorch model to TensorRT engine.
C++
19
star
46

yolov5_mask

Try add Instance Segmentation upon YoloV5
Python
18
star
47

libnms

libnms.so for object detection, can be use in libtorch or caffe or nccn or onnx or TensorRT
Cuda
17
star
48

pt_enet

Realtime segmentation with ENet, the fast and accurate segmentation net.
Python
14
star
49

GreatDarkNet

An Edit Version of darknet, and this version you can train and predict on your own datasets! more easily!
C
14
star
50

VIBE_yolov5

Using YOLOv5 as detection on VIBE
Python
13
star
51

daybreak_release

Daybreak APP release
12
star
52

gofind

gofind - your personal find helper
Go
12
star
53

cabinet

Cabinet, The Ultimate Tool Box.
Rust
12
star
54

tensorflow_yolov3

A Detailed and Optimized Implementation of Yolo-V3 in Original TensorFlow.
Python
12
star
55

pytorch_name_net

A NetWork Generate Names, Based On Conditional RNN, Set Condition And Generate Different Names.
Python
11
star
56

tensorflow_extractor

State-of-art and Reliable Text-summary and Information Extraction
Python
11
star
57

RetinaNet

Pytorch Implementation of RetinaNet with CUDA accelerate nms operation.
Python
10
star
58

gluon_ssd

Implement SSD using Gluon in only 300 lines of codes!
Python
10
star
59

m

m editor is a modern, easy to use, fast terminal editor then vim or emacs. written in pure Rust.
Rust
10
star
60

wnnx_models

Various test models in WNNX format. It can view with `pip install wnetron && wnetron`
10
star
61

seg_icnet

ICNet in TensorFlow, Real-Time Segmentation
Python
10
star
62

fusion

Fusion package with transformation between camera and lidar, IMU etc. Autonomous and robot helper.
Python
9
star
63

scraper_toolbox

Python3.6 Scraper Toolbox, You can almost Scrap Anything in this Repo, Welcome Pull Request
Python
9
star
64

blackpearl

The Black Pearl in Golang. Personal Assistant.
Go
9
star
65

mxnet_tiny5

mxnet训练自己的数据集分类,支持模型断点训练和预测单张图片
Python
9
star
66

TTS_CN

A Chinese TTS System!
Python
9
star
67

arxiv_action

企业微信机器人或钉钉机器人定制服务,自动推送arxiv最新paper
Python
9
star
68

papers

Contains many papers with categories in CV, NLP, RL Quantum etc.
8
star
69

pytorch_style_transfer

A Simple Implementation of Neural Style Transfer using Pytorch. You can generate your own art pictures now!
Python
8
star
70

tacotron

TensorFlow implementation of Google Tacotron. Train on Audio and Generate Speech using Text. Which can be Called TTS.
Python
8
star
71

yolov8

7
star
72

numgo

NumPy library in Go.
Go
7
star
73

LLaVA-Magvit2

Python
7
star
74

PoseAILiveLink

PoseAI LiveLink Compatible on macOS
C++
7
star
75

gooooup

Upload load images(files) to cloud, generate permanent link.
Go
7
star
76

mjolnir

Light weighted replacement of original thor C++ library. More simpler, more clean, more light.
C++
7
star
77

UbuntuScripts

Shell
7
star
78

MLLM_Factory

A Dead Simple and Modularized Multi-Modal Training and Finetune Framework. Compatible to any LLaVA/Flamingo/QwenVL/MiniGemini etc series models.
7
star
79

visiontransformers

Vision Transformers that you need.
Python
6
star
80

sherpa_ort

ONNXRuntime ASR C++
C++
6
star
81

minitr

Exploration on Micro Transformers, Unleash the power of mini-transformers!
Python
6
star
82

tensorflow_wgan

A Tensorfow Version of the state-of-art Wasserstein GAN, image super resolution, black image colorful, more function are applying...just star!
Python
6
star
83

tensorflow_classifier

Simple and over-through process for Tensorflow classify images, using own dataset
Python
6
star
84

mxnet_ssd

Another maintained mxnet ssd version
Python
6
star
85

caffe_tiny5

Caffe tutorial for train own data and predict using python
Python
6
star
86

mmc

Next Gen MMD runs on all platforms, Windows, Linux, Mac. Will support exchange between vmd and fbx format.
C++
6
star
87

realrender

3D mesh render without pain.
C++
6
star
88

squeezeseg_pytorch

Realtime Point Cloud Segmentation
Python
6
star
89

vits_cpp

C++ and ONNXRuntime based VITS voice synthesis
C++
6
star
90

tf_pose_realtime

Realtime Openpose with MobileNetV2 backend
PureBasic
6
star
91

AwesomeLLM

6
star
92

mono_odometry

Visual Odometry Using Mono Camera
C++
6
star
93

person_tracking

person tracking in ros
C++
5
star
94

sparrow

The message server in Golang, like WeChat.
JavaScript
5
star
95

algorithm

Contains all kinds of algorithm write in Python and C++, some with Rust.
Python
5
star
96

CaffeHandsOn

This is a Caffe hands on tutorial.
Python
5
star
97

sak

Swiss Army Knife for secret hacking and sniffering
Go
5
star
98

instance_seg_tf

Instance Segmentation with discriminate loss
Python
5
star
99

efficientformers

Collection of efficient transformers.
Python
5
star
100

mumoda

Library to lean big models combined with Text and Image. And then Diffusion!
Python
5
star