GithubHelp home page GithubHelp logo

briandfoy / unicode-tussle Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 8.0 6.22 MB

Tom( Christiansen)'s Unicode Scripts So Life is Easier

Home Page: https://metacpan.org/pod/Unicode::Tussle

License: Other

Java 1.81% Perl 98.19%
perl unicode perl-module perl-tool

unicode-tussle's Introduction

Coverage Status

The Unicode::Tussle module

This is the README for the Unicode::Tussle Perl module. You're probably looking at this because you don't know where else to find what you're looking for. Read this once and you might never have to read one again for any Perl module.

Legacy module adjustments

If you want to use the `hantest` program, you need to install a patched version of Lingua::JA::Romanize::Japanese from https://github.com/briandfoy/lingua-ja-romanize-japanese. The CPAN version of the module tries to install data files from a website that doesn't exist. The data files are at https://github.com/skk-dev/dict.

If you run into problems with either of these modules, install them first then try to install this module:

% git clone https://github.com/briandfoy/lingua-ja-romanize-japanese.git /tmp/lingua-ja-romanize-japanese
% ( cd /tmp/lingua-ja-romanize-japanese && cpan . )

% git clone https://github.com/briandfoy/unicode-unihan.git /tmp/unicode-unihan
% ( cd /tmp/unicode-unihan && cpan . )

Documentation

To read about Unicode::Tussle, look at the embedded documentation in the module itself. Inside the distribution, you can format it with perldoc:

% perldoc lib/Unicode/Tussle.pm

If you have already installed the module, you can specify the module name instead of the file location:

% perldoc Unicode::Tussle

You can read the documentation and inspect the meta data on MetaCPAN.

The standard module documentation has example uses in the SYNOPSIS section, but you can also look in the examples/ directory (if it's there), or look at the test files in t/.

Installation

You can install this module with a CPAN client, which will resolve and install the dependencies:

% cpan Unicode::Tussle
% cpanm Unicode::Tussle

You can also install directly from the distribution directory, which will also install the dependencies:

% cpan .
% cpanm .

You could install just this module manually:

% perl Makefile.PL
% make
% make test
% make install

You probably don't want to do that unless you're fiddling with the module and only want to run the tests without installing anything.

Source location

The meta data, such as the source repository and bug tracker, is in Makefile.PL or the META.* files it creates. You can find that on those CPAN web interfaces, but you can also look at files directly in the source repository:

If you find a problem, file a ticket in the issue tracker:

Getting help

Although I'm happy to hear from module users in private email, that's the best way for me to forget to do something.

Besides the issue trackers, you can find help at Perlmonks or Stackoverflow, both of which have many competent Perlers who can answer your question, almost in real time. They might not know the particulars of this module, but they can help you diagnose your problem.

You might like to read brian's Guide to Solving Any Perl Problem.

You should have received a LICENSE file, but the license is also noted in the module files. About the only thing you can't do is pretend that you wrote code that you didn't.

Good luck!

Enjoy,

brian d foy, [email protected]

unicode-tussle's People

Contributors

briandfoy avatar esabol avatar hatorikibble avatar ranguard avatar rjbs avatar rurban avatar tsibley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

unicode-tussle's Issues

MIME::Charset not listed in TEST_REQUIRES

Two of the Unicode-Tussle tests require the MIME::Charset module, but it is not listed under TEST_REQUIRES in Makefile.PL, so the user doesn't find out about the prereq until the tests fail:

make[1]: Leaving directory '/path/to/Unicode-Tussle/Unicode-Tussle-1.11'
cd Unicode-Tussle-1.11 && make test LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFIX="/usr/local" PASTHRU_DEFINE=' ' PASTHRU_INC=' '
/path/to/Unicode-Tussle/Unicode-Tussle-1.11
make[1]: Entering directory '/path/to/Unicode-Tussle/Unicode-Tussle-1.11'
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/compile.t .. 1/?
#   Failed test 'blib/script/hantest compiles'
#   at t/compile.t line 22.
#                   'Can't locate MIME/Charset.pm in @INC (you may need to install the MIME::Charset module) (@INC contains: /path/to/Unicode-Tussle/Unicode-Tussle-1.11/blib/lib /path/to/Unicode-Tussle/Unicode-Tussle-1.11/blib/arch /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5 /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/LineBreak.pm line 22.
# BEGIN failed--compilation aborted at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/LineBreak.pm line 22.
# Compilation failed in require at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/GCString.pm line 24.
# BEGIN failed--compilation aborted at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/GCString.pm line 24.
# Compilation failed in require at blib/script/hantest line 29.
# BEGIN failed--compilation aborted at blib/script/hantest line 29.
# '
#     doesn't match '(?^i:syntax OK)'

#   Failed test 'blib/script/unifmt compiles'
#   at t/compile.t line 22.
#                   'Can't locate MIME/Charset.pm in @INC (you may need to install the MIME::Charset module) (@INC contains: /path/to/Unicode-Tussle/Unicode-Tussle-1.11/blib/lib /path/to/Unicode-Tussle/Unicode-Tussle-1.11/blib/arch /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5 /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi /home/someuser/local/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/LineBreak.pm line 22.
# BEGIN failed--compilation aborted at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/LineBreak.pm line 22.
# Compilation failed in require at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/GCString.pm line 24.
# BEGIN failed--compilation aborted at /home/someuser/local/lib/perl5/x86_64-linux-gnu-thread-multi/Unicode/GCString.pm line 24.
# Compilation failed in require at blib/script/unifmt line 24.
# BEGIN failed--compilation aborted at blib/script/unifmt line 24.
# '
#     doesn't match '(?^i:syntax OK)'
t/compile.t .. 31/? # Looks like you failed 2 tests of 37.
t/compile.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/37 subtests

Please remove use of smartmatch

Since smartmatch is now marked as experimental some of the scripts don't work with recent versions of perl. I suppose ordinary =~ or any() from List::MoreUtils would do the trick in most cases.

uniquote warns about given/when being experimental with Perl 5.28.1

I've just installed the current version from CPAN to use uniquote. Unfortunately it warns for given/when being experimental what spills all over the output.

$ echo Übergrößengeschäft | uniquote
given is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 147.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 148.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 149.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 150.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 151.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 152.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 153.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 154.
given is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 2865.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 2866.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 2867.
when is experimental at /home/daniel/perl5/perlbrew/perls/perl-5.28.1-threads-stretch/bin/uniquote line 2868.
\N{U+DC}bergr\N{U+F6}\N{U+DF}engesch\N{U+E4}ft
  • Could this be solved upstream somehow?
  • How to call uniquote while telling Perl not to warn about this? Meanwhile I could use a shell alias to make it call the program this way …

No such file or directory - skk/SKK-JISYO.L.gz

Installation fails on Ubuntu 21.04, Perl 5.32.0:

$ cpanm -v .
cpanm (App::cpanminus) 1.7044 on perl 5.032000 built for x86_64-linux
Work directory is /home/hakon/.cpanm/work/1639077839.1489729
You have make /bin/make
You have LWP 6.53
You have /bin/tar: tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /bin/unzip
--> Working on .
Entering /home/hakon/test/perl/unicode-tussle
Running Makefile.PL
Configuring /home/hakon/test/perl/unicode-tussle ... Warning: prerequisite Lingua::JA::Romanize::Japanese 0 not found.
WARNING: Older versions of ExtUtils::MakeMaker may errantly install README.pod as part of this distribution. It is recommended to avoid using this path in CPAN modules.
Generating a Unix-style Makefile
Writing Makefile for Unicode::Tussle
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Unicode::Unihan 0 ... Yes (0.04)
Checking if you have Lingua::ZH::Romanize::Pinyin 0 ... Yes (0.23)
Checking if you have Test::More 0.94 ... Yes (1.302183)
Checking if you have Lingua::JA::Romanize::Japanese 0 ... No
Checking if you have Lingua::KO::Hangul::Util 0 ... Yes (0.28)
Checking if you have Lingua::KO::Romanize::Hangul 0 ... Yes (0.20)
Checking if you have Unicode::GCString 0 ... Yes (2013.10)
Checking if you have Lingua::EN::Syllable 0 ... Yes (0.30)
==> Found dependencies: Lingua::JA::Romanize::Japanese
Searching Lingua::JA::Romanize::Japanese (0) on cpanmetadb ...
--> Working on Lingua::JA::Romanize::Japanese
Fetching http://www.cpan.org/authors/id/K/KA/KAWASAKI/Lingua-JA-Romanize-Japanese-0.23.tar.gz ... OK
Unpacking Lingua-JA-Romanize-Japanese-0.23.tar.gz
Lingua-JA-Romanize-Japanese-0.23/
Lingua-JA-Romanize-Japanese-0.23/t/
Lingua-JA-Romanize-Japanese-0.23/t/01_kana.t
Lingua-JA-Romanize-Japanese-0.23/t/15_utf8_hepburn.t
Lingua-JA-Romanize-Japanese-0.23/t/11_utf8_kana.t
Lingua-JA-Romanize-Japanese-0.23/t/05_hepburn.t
Lingua-JA-Romanize-Japanese-0.23/t/02_japanese.t
Lingua-JA-Romanize-Japanese-0.23/t/04_mecab.t
Lingua-JA-Romanize-Japanese-0.23/t/12_utf8_japanese.t
Lingua-JA-Romanize-Japanese-0.23/t/00_pod.t
Lingua-JA-Romanize-Japanese-0.23/t/13_utf8_juman.t
Lingua-JA-Romanize-Japanese-0.23/t/14_utf8_mecab.t
Lingua-JA-Romanize-Japanese-0.23/t/03_juman.t
Lingua-JA-Romanize-Japanese-0.23/make-dist.sh
Lingua-JA-Romanize-Japanese-0.23/lib/
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Kana/
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Kana/Hepburn.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/DictJA.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Kana.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Japanese.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Base.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/MeCab.pm
Lingua-JA-Romanize-Japanese-0.23/lib/Lingua/JA/Romanize/Juman.pm
Lingua-JA-Romanize-Japanese-0.23/MANIFEST
Lingua-JA-Romanize-Japanese-0.23/README
Lingua-JA-Romanize-Japanese-0.23/META.yml
Lingua-JA-Romanize-Japanese-0.23/Makefile.PL
Lingua-JA-Romanize-Japanese-0.23/skk/
Lingua-JA-Romanize-Japanese-0.23/skk/SKK-JISYO.S
Lingua-JA-Romanize-Japanese-0.23/Changes
Entering Lingua-JA-Romanize-Japanese-0.23
Checking configure dependencies from META.yml
Running Makefile.PL
Configuring Lingua-JA-Romanize-Japanese-0.23 ... Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Lingua::JA::Romanize::Japanese
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have Test::More 0 ... Yes (1.302183)
Checking if you have DB_File 0 ... Yes (1.853)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (7.62)
Checking if you have LWP::UserAgent 0 ... Yes (6.53)
Building and testing Lingua-JA-Romanize-Japanese-0.23 ... "/home/hakon/perlbrew/perls/perl-5.32.0/bin/perl" -Ilib -MLingua::JA::Romanize::DictJA -e 'Lingua::JA::Romanize::DictJA->update();'
Updater: Lingua::JA::Romanize::DictJA (0.23)
Path: lib/Lingua/JA/Romanize/Japanese.bdb
Loading module: DB_File.pm
Loading module: LWP::UserAgent
Loading module: IO::Zlib
Loading module: Encode.pm
External dictionaries:
	http://openlab.jp/skk/dic/SKK-JISYO.L.gz
	http://openlab.jp/skk/dic/SKK-JISYO.jinmei.gz
	http://openlab.jp/skk/dic/SKK-JISYO.propernoun.gz
	http://openlab.jp/skk/dic/SKK-JISYO.geo.gz
	http://openlab.jp/skk/dic/SKK-JISYO.station.gz
Do you wish to download these files? [y] y
Fetching file: http://openlab.jp/skk/dic/SKK-JISYO.L.gz
Loading dictionary: skk/SKK-JISYO.L.gz
No such file or directory - skk/SKK-JISYO.L.gz
make: *** [Makefile:930: lib/Lingua/JA/Romanize/Japanese.bdb] Error 2
FAIL
! Installing Lingua::JA::Romanize::Japanese failed. See /home/hakon/.cpanm/work/1639077839.1489729/build.log for details. Retry with --force to force install it.
! Installing the dependencies failed: Module 'Lingua::JA::Romanize::Japanese' is not installed
! Bailing out the installation for Unicode-Tussle-1.113.

possible to rename some scripts to ease distro packaging?

Hi, I find Unicode-Tussle useful and really want it to be in repository of common Linux distributions. However, I found that some scripts have name conflicts with other applications: on Fedora, there is another rename from util-linux, and there is tc from iproute. The name clash will make the packaging a bit difficult. Can they be renamed to ease the packaging?

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.