GithubHelp home page GithubHelp logo

yangsamuellu / emoji-chengyu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alingse/emoji-chengyu

1.0 1.0 0.0 1.1 MB

把成语转成 emoji 来猜谜的小玩具

License: MIT License

Shell 1.58% Python 98.42%

emoji-chengyu's Introduction

emoji-chengyu

把成语转成 emoji 来猜谜的小玩具

可以用于中秋, 元宵猜灯谜

Usage

Cli

pip3 install emoji-chengyu
emoji-chengyu-cli
emoji-chengyu-cli --count 20

# 游戏模式
emoji-chengyu-cli --game

例子

披麻戴孝 🍺🦄🦘🎓
走石飞沙 🏃🦁☕👙
立马万言 🌰🦄🎃👁
一苇可航 🥼🍤👍👩‍🚀
飞沙走砾 ☕👙🏃🌰
诸子百家 🐷🍆🥬👩‍👩‍👦
三山五岳 🌂⚡🕺🌕
左思右想 👈🤔👉🤔
指手点脚 💅🤚👩‍💻🦶

Libary

from emoji_chengyu.puzzle import gen_puzzle

for p in gen_puzzle():
    print(p.puzzle_str, p.chengyu_item.word)

起因

春节有朋友在微信发的谜题

原理

成语 --> 拼音 && Emoji --> 含义 --> 拼音

利用同音或者谐音, 通过拼音关联成语和 Emoji

Example:

喜上眉梢 <---> 😄👆🌹🔥

  1. 😄 --> 高兴 --> 喜
  2. 👆 --> 向上 --> 上
  3. 🌹 --> 玫瑰 --> 玫(眉)
  4. 🔥 --> 火焰 --> 烧(梢)

数据源

  1. 成语

搜了下 github 有中华新华字典数据库 https://github.com/pwxcoo/chinese-xinhua MIT

而且包含了成语的拼音

  1. emoji

emoji 转中文搜了下,有好几个

TODO

  1. make an easy web

emoji-chengyu's People

Contributors

alingse avatar

Stargazers

samuel avatar

Watchers

James Cloos avatar

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.