summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-29 12:17:48 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-29 12:17:48 +0000
commitfc95592ee7c9b72e6e66c65fb239905262d5b2d7 (patch)
treef6aeac380b98d4c26ae558589975d2c78f254bc7
parentb964d942c20cff02f294d94f6bcf0f2bab8265c0 (diff)
automatic import of python-cutlet
-rw-r--r--.gitignore1
-rw-r--r--python-cutlet.spec357
-rw-r--r--sources1
3 files changed, 359 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..bc322a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cutlet-0.1.19.tar.gz
diff --git a/python-cutlet.spec b/python-cutlet.spec
new file mode 100644
index 0000000..b978cda
--- /dev/null
+++ b/python-cutlet.spec
@@ -0,0 +1,357 @@
+%global _empty_manifest_terminate_build 0
+Name: python-cutlet
+Version: 0.1.19
+Release: 1
+Summary: Romaji converter
+License: MIT License
+URL: https://github.com/polm/cutlet
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c8/03/b3d4e90c2a7aee65fff6b99024f00dba78cf5e6d5579150c2eb80c5858ae/cutlet-0.1.19.tar.gz
+BuildArch: noarch
+
+
+%description
+[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/polm/cutlet-demo/main/demo.py)
+[![Current PyPI packages](https://badge.fury.io/py/cutlet.svg)](https://pypi.org/project/cutlet/)
+
+# cutlet
+
+<img src="https://github.com/polm/cutlet/raw/master/cutlet.png" width=125 height=125 alt="cutlet by Irasutoya" />
+
+Cutlet is a tool to convert Japanese to romaji. Check out the [interactive demo][demo]!
+
+[demo]: https://share.streamlit.io/polm/cutlet-demo/main/demo.py
+
+**issueを英語で書く必要はありません。**
+
+Features:
+
+- support for [Modified Hepburn](https://en.wikipedia.org/wiki/Hepburn_romanization), [Kunreisiki](https://en.wikipedia.org/wiki/Kunrei-shiki_romanization), [Nihonsiki](https://en.wikipedia.org/wiki/Nihon-shiki_romanization) systems
+- custom overrides for individual mappings
+- custom overrides for specific words
+- built in exceptions list (Tokyo, Osaka, etc.)
+- uses foreign spelling when available in UniDic
+- proper nouns are capitalized
+- slug mode for url generation
+
+Things not supported:
+
+- traditional Hepburn n-to-m: Shimbashi
+- macrons or circumflexes: Tōkyō, Tôkyô
+- passport Hepburn: Satoh (but you can use an exception)
+- hyphenating words
+- Traditional Hepburn in general is not supported
+
+Internally, cutlet uses [fugashi](https://github.com/polm/fugashi), so you can
+use the same dictionary you use for normal tokenization.
+
+## Installation
+
+Cutlet can be installed through pip as usual.
+
+ pip install cutlet
+
+Note that if you don't have a MeCab dictionary installed you'll also have to
+install one. If you're just getting started
+[unidic-lite](https://github.com/polm/unidic-lite) is probably fine.
+
+ pip install unidic-lite
+
+## Usage
+
+A command-line script is included for quick testing. Just use `cutlet` and each
+line of stdin will be treated as a sentence. You can specify the system to use
+(`hepburn`, `kunrei`, `nippon`, or `nihon`) as the first argument.
+
+ $ cutlet
+ ローマ字変換プログラム作ってみた。
+ Roma ji henkan program tsukutte mita.
+
+In code:
+
+```python
+import cutlet
+katsu = cutlet.Cutlet()
+katsu.romaji("カツカレーは美味しい")
+# => 'Cutlet curry wa oishii'
+
+# you can print a slug suitable for urls
+katsu.slug("カツカレーは美味しい")
+# => 'cutlet-curry-wa-oishii'
+
+# You can disable using foreign spelling too
+katsu.use_foreign_spelling = False
+katsu.romaji("カツカレーは美味しい")
+# => 'Katsu karee wa oishii'
+
+# kunreisiki, nihonsiki work too
+katu = cutlet.Cutlet('kunrei')
+katu.romaji("富士山")
+# => 'Huzi yama'
+
+# comparison
+nkatu = cutlet.Cutlet('nihon')
+
+sent = "彼女は王への手紙を読み上げた。"
+katsu.romaji(sent)
+# => 'Kanojo wa ou e no tegami wo yomiageta.'
+katu.romaji(sent)
+# => 'Kanozyo wa ou e no tegami o yomiageta.'
+nkatu.romaji(sent)
+# => 'Kanozyo ha ou he no tegami wo yomiageta.'
+```
+
+## Alternatives
+
+- [kakasi](http://kakasi.namazu.org/index.html.ja): Historically important, but not updated since 2014.
+- [pykakasi](https://github.com/miurahr/pykakasi): self contained, it does segmentation on its own and uses its own dictionary.
+- [kuroshiro](https://github.com/hexenq/kuroshiro): Javascript based.
+- [kana](https://github.com/gojp/kana): Go based.
+
+%package -n python3-cutlet
+Summary: Romaji converter
+Provides: python-cutlet
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-cutlet
+[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/polm/cutlet-demo/main/demo.py)
+[![Current PyPI packages](https://badge.fury.io/py/cutlet.svg)](https://pypi.org/project/cutlet/)
+
+# cutlet
+
+<img src="https://github.com/polm/cutlet/raw/master/cutlet.png" width=125 height=125 alt="cutlet by Irasutoya" />
+
+Cutlet is a tool to convert Japanese to romaji. Check out the [interactive demo][demo]!
+
+[demo]: https://share.streamlit.io/polm/cutlet-demo/main/demo.py
+
+**issueを英語で書く必要はありません。**
+
+Features:
+
+- support for [Modified Hepburn](https://en.wikipedia.org/wiki/Hepburn_romanization), [Kunreisiki](https://en.wikipedia.org/wiki/Kunrei-shiki_romanization), [Nihonsiki](https://en.wikipedia.org/wiki/Nihon-shiki_romanization) systems
+- custom overrides for individual mappings
+- custom overrides for specific words
+- built in exceptions list (Tokyo, Osaka, etc.)
+- uses foreign spelling when available in UniDic
+- proper nouns are capitalized
+- slug mode for url generation
+
+Things not supported:
+
+- traditional Hepburn n-to-m: Shimbashi
+- macrons or circumflexes: Tōkyō, Tôkyô
+- passport Hepburn: Satoh (but you can use an exception)
+- hyphenating words
+- Traditional Hepburn in general is not supported
+
+Internally, cutlet uses [fugashi](https://github.com/polm/fugashi), so you can
+use the same dictionary you use for normal tokenization.
+
+## Installation
+
+Cutlet can be installed through pip as usual.
+
+ pip install cutlet
+
+Note that if you don't have a MeCab dictionary installed you'll also have to
+install one. If you're just getting started
+[unidic-lite](https://github.com/polm/unidic-lite) is probably fine.
+
+ pip install unidic-lite
+
+## Usage
+
+A command-line script is included for quick testing. Just use `cutlet` and each
+line of stdin will be treated as a sentence. You can specify the system to use
+(`hepburn`, `kunrei`, `nippon`, or `nihon`) as the first argument.
+
+ $ cutlet
+ ローマ字変換プログラム作ってみた。
+ Roma ji henkan program tsukutte mita.
+
+In code:
+
+```python
+import cutlet
+katsu = cutlet.Cutlet()
+katsu.romaji("カツカレーは美味しい")
+# => 'Cutlet curry wa oishii'
+
+# you can print a slug suitable for urls
+katsu.slug("カツカレーは美味しい")
+# => 'cutlet-curry-wa-oishii'
+
+# You can disable using foreign spelling too
+katsu.use_foreign_spelling = False
+katsu.romaji("カツカレーは美味しい")
+# => 'Katsu karee wa oishii'
+
+# kunreisiki, nihonsiki work too
+katu = cutlet.Cutlet('kunrei')
+katu.romaji("富士山")
+# => 'Huzi yama'
+
+# comparison
+nkatu = cutlet.Cutlet('nihon')
+
+sent = "彼女は王への手紙を読み上げた。"
+katsu.romaji(sent)
+# => 'Kanojo wa ou e no tegami wo yomiageta.'
+katu.romaji(sent)
+# => 'Kanozyo wa ou e no tegami o yomiageta.'
+nkatu.romaji(sent)
+# => 'Kanozyo ha ou he no tegami wo yomiageta.'
+```
+
+## Alternatives
+
+- [kakasi](http://kakasi.namazu.org/index.html.ja): Historically important, but not updated since 2014.
+- [pykakasi](https://github.com/miurahr/pykakasi): self contained, it does segmentation on its own and uses its own dictionary.
+- [kuroshiro](https://github.com/hexenq/kuroshiro): Javascript based.
+- [kana](https://github.com/gojp/kana): Go based.
+
+%package help
+Summary: Development documents and examples for cutlet
+Provides: python3-cutlet-doc
+%description help
+[![Open in Streamlit](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://share.streamlit.io/polm/cutlet-demo/main/demo.py)
+[![Current PyPI packages](https://badge.fury.io/py/cutlet.svg)](https://pypi.org/project/cutlet/)
+
+# cutlet
+
+<img src="https://github.com/polm/cutlet/raw/master/cutlet.png" width=125 height=125 alt="cutlet by Irasutoya" />
+
+Cutlet is a tool to convert Japanese to romaji. Check out the [interactive demo][demo]!
+
+[demo]: https://share.streamlit.io/polm/cutlet-demo/main/demo.py
+
+**issueを英語で書く必要はありません。**
+
+Features:
+
+- support for [Modified Hepburn](https://en.wikipedia.org/wiki/Hepburn_romanization), [Kunreisiki](https://en.wikipedia.org/wiki/Kunrei-shiki_romanization), [Nihonsiki](https://en.wikipedia.org/wiki/Nihon-shiki_romanization) systems
+- custom overrides for individual mappings
+- custom overrides for specific words
+- built in exceptions list (Tokyo, Osaka, etc.)
+- uses foreign spelling when available in UniDic
+- proper nouns are capitalized
+- slug mode for url generation
+
+Things not supported:
+
+- traditional Hepburn n-to-m: Shimbashi
+- macrons or circumflexes: Tōkyō, Tôkyô
+- passport Hepburn: Satoh (but you can use an exception)
+- hyphenating words
+- Traditional Hepburn in general is not supported
+
+Internally, cutlet uses [fugashi](https://github.com/polm/fugashi), so you can
+use the same dictionary you use for normal tokenization.
+
+## Installation
+
+Cutlet can be installed through pip as usual.
+
+ pip install cutlet
+
+Note that if you don't have a MeCab dictionary installed you'll also have to
+install one. If you're just getting started
+[unidic-lite](https://github.com/polm/unidic-lite) is probably fine.
+
+ pip install unidic-lite
+
+## Usage
+
+A command-line script is included for quick testing. Just use `cutlet` and each
+line of stdin will be treated as a sentence. You can specify the system to use
+(`hepburn`, `kunrei`, `nippon`, or `nihon`) as the first argument.
+
+ $ cutlet
+ ローマ字変換プログラム作ってみた。
+ Roma ji henkan program tsukutte mita.
+
+In code:
+
+```python
+import cutlet
+katsu = cutlet.Cutlet()
+katsu.romaji("カツカレーは美味しい")
+# => 'Cutlet curry wa oishii'
+
+# you can print a slug suitable for urls
+katsu.slug("カツカレーは美味しい")
+# => 'cutlet-curry-wa-oishii'
+
+# You can disable using foreign spelling too
+katsu.use_foreign_spelling = False
+katsu.romaji("カツカレーは美味しい")
+# => 'Katsu karee wa oishii'
+
+# kunreisiki, nihonsiki work too
+katu = cutlet.Cutlet('kunrei')
+katu.romaji("富士山")
+# => 'Huzi yama'
+
+# comparison
+nkatu = cutlet.Cutlet('nihon')
+
+sent = "彼女は王への手紙を読み上げた。"
+katsu.romaji(sent)
+# => 'Kanojo wa ou e no tegami wo yomiageta.'
+katu.romaji(sent)
+# => 'Kanozyo wa ou e no tegami o yomiageta.'
+nkatu.romaji(sent)
+# => 'Kanozyo ha ou he no tegami wo yomiageta.'
+```
+
+## Alternatives
+
+- [kakasi](http://kakasi.namazu.org/index.html.ja): Historically important, but not updated since 2014.
+- [pykakasi](https://github.com/miurahr/pykakasi): self contained, it does segmentation on its own and uses its own dictionary.
+- [kuroshiro](https://github.com/hexenq/kuroshiro): Javascript based.
+- [kana](https://github.com/gojp/kana): Go based.
+
+%prep
+%autosetup -n cutlet-0.1.19
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-cutlet -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.19-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c58ec37
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+38f53aa069fa8b2245c245dce66ff835 cutlet-0.1.19.tar.gz