Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: peaceiris/emoji-ime-dictionary
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.3
Choose a base ref
...
head repository: peaceiris/emoji-ime-dictionary
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jul 27, 2020

  1. feat: Add emoji.windows.txt

    Microsoft IME 形式の辞書を release assets に追加
    
    Close #4
    peaceiris committed Jul 27, 2020
    Copy the full SHA
    3333f46 View commit details
  2. ci: add nkf

    peaceiris authored Jul 27, 2020
    Copy the full SHA
    cb4bb78 View commit details
  3. feat: Add dictionaries for ATOK

    - ATOK for Windows
    - ATOK for Mac (macOS)
    peaceiris committed Jul 27, 2020
    Copy the full SHA
    dd54469 View commit details
  4. docs: Add ATOK section

    peaceiris committed Jul 27, 2020
    Copy the full SHA
    acf0230 View commit details
  5. docs: fix release_notes.md

    peaceiris committed Jul 27, 2020
    Copy the full SHA
    863af4a View commit details
  6. fix: ATOK dictionaries

    peaceiris committed Jul 27, 2020
    Copy the full SHA
    54fee91 View commit details
  7. Copy the full SHA
    76aa416 View commit details
  8. Copy the full SHA
    acf3002 View commit details
  9. Copy the full SHA
    01deb79 View commit details
  10. docs: [ImgBot] Optimize images (#25)

    *Total -- 724.73kb -> 687.02kb (5.2%)
    
    /images/emoji_2.gif -- 316.45kb -> 299.38kb (5.4%)
    /images/emoji_1.gif -- 408.28kb -> 387.64kb (5.05%)
    
    Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
    
    Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
    imgbot[bot] and ImgBotApp authored Jul 27, 2020
    Copy the full SHA
    40a8d4f View commit details
  11. Copy the full SHA
    6b99e8b View commit details

Commits on Aug 10, 2020

  1. ci: update actions/checkout requirement to v2.3.2 (#27)

    Updates the requirements on [actions/checkout](https://github.com/actions/checkout) to permit the latest version.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/actions/checkout/commits/2036a08e25fa78bbd946711a407b529a0a1204bf)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 10, 2020
    Copy the full SHA
    2f7c582 View commit details

Commits on Aug 19, 2020

  1. Copy the full SHA
    f97abe6 View commit details

Commits on Aug 22, 2020

  1. ライセンス表記をより明確にする

    README.md で言及しただけだったので LICENSE にも明記する
    peaceiris authored Aug 22, 2020
    Copy the full SHA
    9a01441 View commit details

Commits on Sep 24, 2020

  1. ci: bump actions/checkout from v2.3.2 to v2.3.3 (#29)

    Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.2 to v2.3.3.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v2.3.2...a81bbbf)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Sep 24, 2020
    Copy the full SHA
    c816462 View commit details

Commits on Oct 12, 2020

  1. Copy the full SHA
    e442ab8 View commit details

Commits on Nov 4, 2020

  1. ci: bump actions/checkout from v2.3.3 to v2.3.4 (#36)

    Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.3 to v2.3.4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v2.3.3...5a4ac90)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 4, 2020
    Copy the full SHA
    0e26d96 View commit details

Commits on Nov 6, 2020

  1. deps: bump pox from 0.2.8 to 0.2.9 (#33)

    Bumps [pox](https://github.com/uqfoundation/pox) from 0.2.8 to 0.2.9.
    - [Release notes](https://github.com/uqfoundation/pox/releases)
    - [Commits](uqfoundation/pox@0.2.8...0.2.9)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 6, 2020
    Copy the full SHA
    da94b92 View commit details
  2. deps: bump dill from 0.3.2 to 0.3.3 (#35)

    Bumps [dill](https://github.com/uqfoundation/dill) from 0.3.2 to 0.3.3.
    - [Release notes](https://github.com/uqfoundation/dill/releases)
    - [Commits](uqfoundation/dill@dill-0.3.2...dill-0.3.3)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 6, 2020
    Copy the full SHA
    eb905a6 View commit details
  3. Copy the full SHA
    b00623c View commit details
  4. deps: bump klepto from 0.1.9 to 0.2.0 (#34)

    Bumps [klepto](https://github.com/uqfoundation/klepto) from 0.1.9 to 0.2.0.
    - [Release notes](https://github.com/uqfoundation/klepto/releases)
    - [Commits](uqfoundation/klepto@klepto-0.1.9...klepto-0.2.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 6, 2020
    Copy the full SHA
    8e88cfb View commit details

Commits on Nov 7, 2020

  1. Copy the full SHA
    806502f View commit details
  2. Copy the full SHA
    3382036 View commit details

Commits on Nov 8, 2020

  1. Use Janome and NEologd instead of pykakasi

    Related to #32
    Close #31
    ensan-hcl authored Nov 8, 2020
    Copy the full SHA
    669f945 View commit details

Commits on Nov 9, 2020

  1. make build

    peaceiris committed Nov 9, 2020
    Copy the full SHA
    c76ee5f View commit details
  2. Remove duplicate (#44)

    Close #43
    peaceiris authored Nov 9, 2020
    Copy the full SHA
    acd7344 View commit details

Commits on Nov 22, 2020

  1. Add link to janome

    [mocobeta/janome: Japanese morphological analysis engine written in pure Python](https://github.com/mocobeta/janome)
    peaceiris authored Nov 22, 2020
    Copy the full SHA
    d10b5a1 View commit details

Commits on Nov 26, 2020

  1. deps: bump pykakasi from 2.0.1 to 2.0.3 (#45)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.0.1 to 2.0.3.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.0.1...v2.0.3)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 26, 2020
    Copy the full SHA
    47d6819 View commit details

Commits on Nov 27, 2020

  1. deps: bump pykakasi from 2.0.3 to 2.0.4 (#46)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.0.3 to 2.0.4.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.0.3...v2.0.4)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 27, 2020
    Copy the full SHA
    e2fa75a View commit details

Commits on Feb 8, 2021

  1. deps: bump pykakasi from 2.0.4 to 2.0.6 (#47)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.0.4 to 2.0.6.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.0.4...v2.0.6)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 8, 2021
    Copy the full SHA
    d7d367a View commit details

Commits on May 5, 2021

  1. deps: bump pykakasi from 2.0.6 to 2.0.8 (#48)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.0.6 to 2.0.8.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.0.6...v2.0.8)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 5, 2021
    Copy the full SHA
    2511fb5 View commit details

Commits on May 7, 2021

  1. deps: bump six from 1.15.0 to 1.16.0 (#49)

    Bumps [six](https://github.com/benjaminp/six) from 1.15.0 to 1.16.0.
    - [Release notes](https://github.com/benjaminp/six/releases)
    - [Changelog](https://github.com/benjaminp/six/blob/master/CHANGES)
    - [Commits](benjaminp/six@1.15.0...1.16.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 7, 2021
    Copy the full SHA
    493e897 View commit details

Commits on May 10, 2021

  1. deps: bump pykakasi from 2.0.8 to 2.1.0 (#50)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.0.8 to 2.1.0.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.0.8...v2.1.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 10, 2021
    Copy the full SHA
    90fa0ce View commit details

Commits on May 17, 2021

  1. deps: bump pykakasi from 2.1.0 to 2.1.1 (#51)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.1.0 to 2.1.1.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.1.0...v2.1.1)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 17, 2021
    Copy the full SHA
    bdaa9b5 View commit details

Commits on Jun 14, 2021

  1. deps: bump pox from 0.2.9 to 0.3.0 (#54)

    Bumps [pox](https://github.com/uqfoundation/pox) from 0.2.9 to 0.3.0.
    - [Release notes](https://github.com/uqfoundation/pox/releases)
    - [Commits](uqfoundation/pox@0.2.9...pox-0.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: pox
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 14, 2021
    Copy the full SHA
    b457684 View commit details
  2. deps: bump dill from 0.3.3 to 0.3.4 (#53)

    Bumps [dill](https://github.com/uqfoundation/dill) from 0.3.3 to 0.3.4.
    - [Release notes](https://github.com/uqfoundation/dill/releases)
    - [Commits](uqfoundation/dill@dill-0.3.3...dill-0.3.4)
    
    ---
    updated-dependencies:
    - dependency-name: dill
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 14, 2021
    Copy the full SHA
    e5e2887 View commit details
  3. deps: bump klepto from 0.2.0 to 0.2.1 (#52)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 14, 2021
    Copy the full SHA
    b1b238f View commit details
  4. ci: Improve workflows (#55)

    - Enable COMPOSE_DOCKER_CLI_BUILD DOCKER_BUILDKIT
    - Replace hub with gh
    
    The reason to use `gh release delete` is here: cli/cli#1997
    peaceiris authored Jun 14, 2021
    Copy the full SHA
    10a3bac View commit details

Commits on Jun 23, 2021

  1. deps: bump pykakasi from 2.1.1 to 2.2.0 (#56)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.1.1 to 2.2.0.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/master/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.1.1...v2.2.0)
    
    ---
    updated-dependencies:
    - dependency-name: pykakasi
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 23, 2021
    Copy the full SHA
    b09c293 View commit details

Commits on Jul 12, 2021

  1. deps: bump pykakasi from 2.2.0 to 2.2.1 (#57)

    Bumps [pykakasi](https://github.com/miurahr/pykakasi) from 2.2.0 to 2.2.1.
    - [Release notes](https://github.com/miurahr/pykakasi/releases)
    - [Changelog](https://github.com/miurahr/pykakasi/blob/v2.2.1/CHANGELOG.rst)
    - [Commits](miurahr/pykakasi@v2.2.0...v2.2.1)
    
    ---
    updated-dependencies:
    - dependency-name: pykakasi
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 12, 2021
    Copy the full SHA
    3fd5e8d View commit details

Commits on Oct 18, 2021

  1. ci: bump actions/checkout from 2.3.4 to 2.3.5 (#58)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 18, 2021
    Copy the full SHA
    4be7ca5 View commit details

Commits on Nov 3, 2021

  1. ci: bump actions/checkout from 2.3.5 to 2.4.0 (#59)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 3, 2021
    Copy the full SHA
    8235656 View commit details

Commits on Mar 2, 2022

  1. ci: bump actions/checkout from 2.4.0 to 3 (#60)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 2, 2022
    Copy the full SHA
    20be9aa View commit details

Commits on Jun 29, 2022

  1. Copy the full SHA
    ae32354 View commit details

Commits on Jan 14, 2023

  1. deps: bump pox from 0.3.0 to 0.3.2 (#68)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 14, 2023
    Copy the full SHA
    deef982 View commit details
  2. Delete dependabot.yml

    peaceiris authored Jan 14, 2023
    Copy the full SHA
    d73fd6d View commit details

Commits on Jan 15, 2023

  1. Configure Renovate (#69)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Shohei Ueda <30958501+peaceiris@users.noreply.github.com>
    renovate[bot] and peaceiris authored Jan 15, 2023
    Copy the full SHA
    7fdb02b View commit details

Commits on Jan 16, 2023

  1. chore(deps): update dependency dill to v0.3.6 (#71)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 16, 2023
    Copy the full SHA
    cf5f3cd View commit details
  2. chore(deps): update dependency klepto to v0.2.3 (#72)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 16, 2023
    Copy the full SHA
    6825130 View commit details
  3. chore(deps): update python docker tag to v3.11 (#73)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 16, 2023
    Copy the full SHA
    d7f258a View commit details
23 changes: 0 additions & 23 deletions .github/dependabot.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -14,9 +14,13 @@ on:

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes: 5
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v2.3.1
- uses: actions/checkout@v3
- run: docker-compose build
- run: make build
- run: make test
12 changes: 7 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -7,14 +7,16 @@ on:

jobs:
main:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
timeout-minutes: 3
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install github/hub
- name: Install nkf
run: |
export HUB_VERSION="2.14.2"
curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
sudo apt update
sudo apt install -y nkf
nkf --version
- name: Upload release assets
env:
18 changes: 17 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
FROM python:3.8.5-slim-buster
FROM python:3.11-slim-buster

ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8

RUN apt-get update && \
apt-get -y install --no-install-recommends \
wget \
jq && \
apt-get autoclean && \
apt-get clean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*

WORKDIR /build
COPY requirements.txt ./requirements.txt
RUN python3 -m pip install --no-cache-dir --upgrade pip && \
python3 -m pip install --no-cache-dir -r ./requirements.txt && \
python3 -m pip check

RUN wget -q https://github.com/peaceiris/emoji-ime-dictionary/releases/download/v2.2.1/Janome-0.4.1-neologd-20200910.tar.gz && \
python3 -m pip install --no-cache-dir --no-compile Janome-0.4.1-neologd-20200910.tar.gz && \
rm Janome-0.4.1-neologd-20200910.tar.gz

RUN wget -q 'https://raw.githubusercontent.com/yagays/emoji-ja/20190726/data/emoji_ja.json' \
-O /root/emoji_ja.json

WORKDIR /src
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2020 peaceiris
Copyright 2018 yag_ays (for the emoji dictionaries: emoji.tsv emoji.txt emoji.*.txt)
Copyright (c) 2020 Shohei Ueda (@peaceiris) (for other files)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build
build:
docker-compose run --rm -T dev python main.py
COMPOSE_DOCKER_CLI_BUILD=1 docker-compose run --rm -T dev python main.py

.PHONY: test
test:
@@ -10,3 +10,7 @@ test:
all:
$(MAKE) test
$(MAKE) build

.PHONY: run
run:
docker-compose run --rm dev bash
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -83,14 +83,19 @@ GitHub, Slack のようにコロン `:` をトリガーとして IME でも絵

- [複数の単語を一括で登録するには](https://support.microsoft.com/ja-jp/help/881925)

作者が Windows を持っていないため検証できていません。どなたか検証をお願いします。
[Issue #4](https://github.com/peaceiris/emoji-ime-dictionary/issues/4)
`emoji.windows.zip` を解凍して得られる `emoji.windows.txt` をインポートしてください。

### ATOK

ATOK は元々の機能として「日本語での絵文字入力」が可能ですが、この IME 追加辞書を導入することで表現力を拡張することができます。

cf. [Add: emoji dictionary for ATOK · Issue #15 · peaceiris/emoji-ime-dictionary](https://github.com/peaceiris/emoji-ime-dictionary/issues/15)
- ATOK for Windows: `emoji.atok-windows.zip`
- ATOK for Mac: `emoji.atok-macos.zip`

| インポート手順 | インポート手順 |
|---|---|
| ![](./images/atok-1.jpg) | ![](./images/atok-2.jpg) |
| ![](./images/atok-3.jpg) | ![](./images/atok-4.jpg) |



@@ -102,12 +107,9 @@ cf. [Add: emoji dictionary for ATOK · Issue #15 · peaceiris/emoji-ime-dictiona

## 作者 - Author

- peaceiris
- [GitHub](https://github.com/peaceiris)
- [Twitter](https://twitter.com/piris314)
- [Amazon wish list](http://amzn.asia/ilWK0Yj)
- [peaceiris homepage](https://peaceiris.com/)

何かあれば [Issue] を立ててください。Fork & [Pull Requests] もお待ちしてます。
何かあれば [Issue] を立ててください。

「Qiita いいね :thumbsup:」や「GitHub Star :star:」をいただけると励みになります。

@@ -118,13 +120,13 @@ cf. [Add: emoji dictionary for ATOK · Issue #15 · peaceiris/emoji-ime-dictiona
- [yagays/emoji-ja: UNICODE絵文字の日本語読み/キーワード/分類辞書](https://github.com/yagays/emoji-ja)
- [project's site](https://yag-ays.github.io/project/emoji-ja/)
- [miurahr/pykakasi](https://github.com/miurahr/pykakasi)
- [mocobeta/janome: Japanese morphological analysis engine written in pure Python](https://github.com/mocobeta/janome)



## ライセンス - License

- [MIT License](./LICENSE)
- `emoji.txt``emoji.tsv`[MIT License - yagays/emoji-ja] を継承しています。
- [MIT License](./LICENSE) ([MIT License - yagays/emoji-ja] を継承しています。)



@@ -136,6 +138,5 @@ cf. [Add: emoji dictionary for ATOK · Issue #15 · peaceiris/emoji-ime-dictiona

<!-- Internal References -->
[Issue]: https://github.com/peaceiris/emoji-ime-dictionary/issues
[Pull Requests]: https://github.com/peaceiris/emoji-ime-dictionary/pulls
<!-- External References -->
[MIT License - yagays/emoji-ja]: https://github.com/yagays/emoji-ja/blob/master/LICENSE.md
Binary file added images/atok-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/atok-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/atok-3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/atok-4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/emoji_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/emoji_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 28 additions & 16 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
import urllib.request
import json
from janome.tokenizer import Tokenizer
from pykakasi import kakasi
import re

from pykakasi import kakasi, wakati
t = Tokenizer()


EMOJI_JSON_URL = 'https://raw.githubusercontent.com/yagays/emoji-ja/20190726/data/emoji_ja.json'
EMOJI_DICT_PATH = 'tsv/emoji.tsv'
kakasi = kakasi()
kakasi.setMode("J","H")
conv_j2h = kakasi.getConverter()
kakasi.setMode("K","H")
conv_k2h = kakasi.getConverter()


def hiraganafy(keyword):
def hiraganafy_v1(keyword):
k = keyword.upper()
k = conv_j2h.do(k)
k = conv_k2h.do(k)
return k


def hiraganafy(keyword):
katakana = ''
for token in t.tokenize(keyword.upper()):
katakana += token.surface if token.reading == '*' else token.reading
hiragana = conv_k2h.do(katakana)
hiragana_v1 = hiraganafy_v1(keyword)
if hiragana != hiragana_v1:
print(f'| {keyword} | {hiragana} | {hiragana_v1} |')
return hiragana


def add_word_to_dict(emoji, keyword, emoji_dict):
valid_keyword = keyword.replace('ゔ', 'う゛')
word = f':{valid_keyword}\t{emoji}\t記号\t'
@@ -30,13 +40,13 @@ class EmojiDict():
emoji_json = None
emoji_dict = []

def __init__(self, emoji_json_url: str, emoji_dict_path: str) -> None:
self.emoji_json_url = emoji_json_url
def __init__(self, emoji_json_path: str, emoji_dict_path: str) -> None:
self.emoji_json_path = emoji_json_path
self.emoji_dict_path = emoji_dict_path

def get_emoji_json(self) -> None:
with urllib.request.urlopen(self.emoji_json_url) as f:
self.emoji_json = json.loads(f.read().decode('utf-8'))
with open(self.emoji_json_path, 'r') as f:
self.emoji_json = json.load(f)

def save_emoji_dict(self) -> None:
with open(self.emoji_dict_path, 'w') as f:
@@ -48,21 +58,23 @@ def create_emoji_dict(self) -> None:
for k in self.emoji_json[emoji]['keywords']:
if k.isalpha() is False:
continue
k = hiraganafy(k)
add_word_to_dict(emoji, k, self.emoji_dict)
hiragana = hiraganafy(k)
add_word_to_dict(emoji, hiragana, self.emoji_dict)

k = self.emoji_json[emoji]['short_name']
if k.isalpha() is False:
continue
k = hiraganafy(k)
add_word_to_dict(emoji, k, self.emoji_dict)
hiragana = hiraganafy(k)
add_word_to_dict(emoji, hiragana, self.emoji_dict)

self.emoji_dict.sort()
self.emoji_dict = sorted(list(set(self.emoji_dict)))
self.emoji_dict = '\n'.join(self.emoji_dict)


if __name__ == "__main__":
emoji_dict = EmojiDict(EMOJI_JSON_URL, EMOJI_DICT_PATH)
EMOJI_JSON_PATH = '/root/emoji_ja.json'
EMOJI_DICT_PATH = 'tsv/emoji.tsv'
emoji_dict = EmojiDict(EMOJI_JSON_PATH, EMOJI_DICT_PATH)
emoji_dict.get_emoji_json()
emoji_dict.create_emoji_dict()
emoji_dict.save_emoji_dict()
43 changes: 37 additions & 6 deletions main_test.py
Original file line number Diff line number Diff line change
@@ -5,12 +5,43 @@
class TestStringMethods(unittest.TestCase):

def test_hiraganafy(self):
katakana = 'カタカナ'
self.assertEqual(main.hiraganafy(katakana), 'かたかな')
kanji = '漢字'
self.assertEqual(main.hiraganafy(kanji), 'かんじ')
hiragana = 'ひらがな'
self.assertEqual(main.hiraganafy(hiragana), 'ひらがな')
test_cases = [
{'in': 'カタカナ', 'out': 'かたかな'},
{'in': '漢字', 'out': 'かんじ'},
{'in': 'ひらがな', 'out': 'ひらがな'},
{'in': '哺乳瓶', 'out': 'ほにゅうびん'},
{'in': '長距離走', 'out': 'ちょうきょりそう'},
{'in': '営', 'out': 'えい'},
{'in': '営マーク', 'out': 'えいまーく'},
{'in': '営業中', 'out': 'えいぎょうちゅう'},
{'in': '営業日', 'out': 'えいぎょうび'},
{'in': 'バルカン人', 'out': 'ばるかんじん'},
{'in': '水球をする人', 'out': 'すいきゅうをするひと'},
{'in': '人のシルエット', 'out': 'ひとのしるえっと'},
{'in': '話す人のシルエット', 'out': 'はなすひとのしるえっと'},
{'in': '2人のシルエット', 'out': 'ふたりのしるえっと'},
{'in': '六芒星', 'out': 'ろくぼうせい'},
{'in': '波乗り', 'out': 'なみのり'},
{'in': 'きらきら星', 'out': 'きらきらぼし'},
{'in': 'くす玉', 'out': 'くすだま'},
{'in': 'ソロモン諸島', 'out': 'そろもんしょとう'},
{'in': 'クリッパートン島', 'out': 'くりっぱーとんとう'},
{'in': '白杖', 'out': 'はくじょう'},
{'in': '介助犬', 'out': 'かいじょけん'},
{'in': '筋トレ', 'out': 'きんとれ'},
]
for t in test_cases:
self.assertEqual(main.hiraganafy(t['in']), t['out'])

def test_hiraganafy_todo(self):
test_cases = [
{'in': 'しかめ面', 'out': 'しかめっつら'},
{'in': 'しかめ面の人', 'out': 'しかめつらのひと'},
{'in': 'フェイスマッサージ中の人', 'out': 'ふぇいすまっさーじちゅうのひと'},
{'in': '六角星', 'out': 'ろっかくせい'},
]
for t in test_cases:
self.assertNotEqual(main.hiraganafy(t['in']), t['out'])

def test_add_word_to_dict(self):
emoji_dict = []
30 changes: 21 additions & 9 deletions release.sh
Original file line number Diff line number Diff line change
@@ -9,21 +9,33 @@ RELEASE_ASSETS_DIR="build"
RELEASE_NOTES="release_notes.md"


\rm -rf "${RELEASE_ASSETS_DIR}" || true
rm -rf "${RELEASE_ASSETS_DIR}" || true
mkdir "${RELEASE_ASSETS_DIR}"
cat $(echo ./tsv/*.tsv) > "./${RELEASE_ASSETS_DIR}/emoji.txt"
(
cd "${RELEASE_ASSETS_DIR}"

zip ./emoji.zip ./emoji.txt
rm ./emoji.txt

# Microsoft IME (Windows)
nkf -w16L -Lw ./emoji.txt > ./emoji.windows.txt
zip ./emoji.windows.zip ./emoji.windows.txt

# ATOK for Windows
sed -e 's/記号/顔文字*/g' ./emoji.windows.txt > ./emoji.atok-windows.txt
zip ./emoji.atok-windows.zip ./emoji.atok-windows.txt

# ATOK for Mac (macOS)
sed -e 's/記号/顔文字*/g' ./emoji.txt > ./emoji.atok-macos.txt
nkf --overwrite -w16L ./emoji.atok-macos.txt
zip ./emoji.atok-macos.zip ./emoji.atok-macos.txt

rm ./*.txt
)

sed -i "1i日本語 IME 絵文字拡張辞書 ${TAG_NAME}\n" "./${RELEASE_NOTES}"

(
cd "${RELEASE_ASSETS_DIR}"
hub release edit \
--file "../${RELEASE_NOTES}" \
$(for i in $(echo *); do echo -n "--attach ${i}#${i} "; done) \
"${TAG_NAME}"
)
gh release delete --yes "${TAG_NAME}"
gh release create "${TAG_NAME}" \
--notes-file "./${RELEASE_NOTES}" \
"${RELEASE_ASSETS_DIR}"/*
7 changes: 5 additions & 2 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
日本語 IME における絵文字入力支援のための絵文字表現拡張辞書

| ファイル名 | 中身 |
| ファイル名 | 対象 IME と OS |
|---|---|
| emoji.zip | 日本語で絵文字を入力するための日本語 IME 向け追加辞書 |
| emoji.zip | Google 日本語入力 (macOS, Ubuntu ibus-mozc) |
| emoji.windows.zip | Windows 版 Google 日本語入力, Microsoft IME |
| emoji.atok-windows.zip | ATOK for Windows |
| emoji.atok-macos.zip | ATOK for Mac |
13 changes: 13 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"local>peaceiris/renovate-config"
],
"packageRules": [
{
"automerge": true,
"matchUpdateTypes": ["minor", "patch"],
"automergeStrategy": "squash"
}
]
}
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dill==0.3.2
klepto==0.1.9
pox==0.2.8
pykakasi==2.0.1
dill==0.3.6
klepto==0.2.3
pox==0.3.2
pykakasi==2.2.1
semidbm==0.5.1
six==1.15.0
six==1.16.0
2,234 changes: 394 additions & 1,840 deletions tsv/emoji.tsv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tsv/emoji_additional.tsv
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
:-1 👎 記号
:ー1 👎 記号
:100 💯 記号
:ぴえん 🥺 記号