text-hyphen 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog DELETED
@@ -1,4 +0,0 @@
1
- == Text::Hyphen 1.0.0
2
- * Initial version based on TeX::Hyphen 0.4.0 (some changes have been backported
3
- to TeX::Hyphen 0.5.0).
4
- * Incorporated many hyphenation pattern files from CTAN.
data/Changelog DELETED
@@ -1,4 +0,0 @@
1
- == Text::Hyphen 1.0.0
2
- * Initial version based on TeX::Hyphen 0.4.0 (some changes have been backported
3
- to TeX::Hyphen 0.5.0).
4
- * Incorporated many hyphenation pattern files from CTAN.
data/INSTALL DELETED
@@ -1,6 +0,0 @@
1
- Installing this package is as simple as:
2
-
3
- % ruby install.rb
4
-
5
- Alternatively, you can use the RubyGem version of TeX::Hyphen available as
6
- text-hyphen-1.0.0.gem from the usual sources.
data/README DELETED
@@ -1,56 +0,0 @@
1
- Text::Hyphen README
2
- ===================
3
-
4
- Text::Hyphen will properly hyphenate various words according to the rules of
5
- the language the word is written in. The algorithm is based on that of the TeX
6
- typesetting system by Donald E. Knuth. This is originally based on the Perl
7
- implementation of TeX::Hyphen[1] and the Ruby port TeX::Hyphen[2]. The
8
- language hyphenation pattern files are based on the sources available from
9
- CTAN[3] as of 2004.12.19 and have been translated by Austin Ziegler.
10
-
11
- This release is 1.0, the initial release of Text::Hyphen, representing a
12
- significant improvement over its predecessor, TeX::Hyphen.
13
-
14
- require 'text/hyphen'
15
- hh = Text::Hyphen.new(:language => 'en_us', :left => 2, :right => 2)
16
- # Defaults to the above
17
- hh = TeX::Hyphen.new
18
-
19
- word = "representation"
20
- points = hyp.hyphenate(word) #=> [3, 5, 8, 10]
21
- puts hyp.visualize(word) #=> rep-re-sen-ta-tion
22
-
23
- Text::Hyphen is truly multilingual in nature[4]. As an example, consider the
24
- difference between the following:
25
-
26
- require 'text/hyphen'
27
- # Using left and right minimum values of 0 ensures that you will see all
28
- # possible hyphenation points, not just those that meet the minimum
29
- # width requirements.
30
- en = Text::Hyphen.new(:left => 0, :right => 0)
31
- fr = Text::Hyphen.new(:language = "fr", :left => 0, :right => 0)
32
-
33
- puts en.visualise("organiser") #=> or-gan-iser
34
- puts fr.visualise("organiser") #=> or-ga-ni-ser
35
-
36
- As you can see, the hyphenation is distinct between the two hyphenators.
37
- Additional improvements over TeX::Hyphen include thread safety (except for
38
- debug control) and support for UTF-8.
39
-
40
- It is very important to read the LICENCE file and each language file desired,
41
- as some languages may be held under a more strict licence than that granted by
42
- LICENCE.
43
-
44
- Copyright
45
- =========
46
- # Copyright 2004 Austin Ziegler <text-hyphen@halostatue.ca>
47
- # See the LICENCE file for more information.
48
-
49
- [1] <http://search.cpan.org/author/JANPAZ/TeX-Hyphen-0.140/lib/TeX/Hyphen.pm>
50
- Maintained by Jan Pazdziora.
51
- [2] Available at <http://rubyforge.org/projects/text-format>.
52
- [3] <http://www.ctan.org>
53
- [4] There are some bugs and design decisions in the original Perl
54
- implementation of TeX::Hyphen that make it unsuitable for most
55
- multilingual implementations that carried over to the Ruby port of
56
- TeX::Hyphen.