Hello community,
here is the log from the commit of package perl-Text-Hunspell for
openSUSE:Factory checked in at 2013-06-06 12:57:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Text-Hunspell (Old)
and /work/SRC/openSUSE:Factory/.perl-Text-Hunspell.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Text-Hunspell"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Text-Hunspell/perl-Text-Hunspell.changes
2011-12-21 17:00:40.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.perl-Text-Hunspell.new/perl-Text-Hunspell.changes
2013-06-06 12:57:51.000000000 +0200
@@ -1,0 +2,23 @@
+Tue Jun 4 15:16:32 UTC 2013 - [email protected]
+
+- updated to 2.08
+ Improved main POD documentation for Hunspell.pm.
+ Fixes RT#84964. Thanks to Paul Flo Williams for the patch.
+ (https://github.com/cosimo/perl5-text-hunspell/pull/2)
+
+ DEPRECATED the delete() method, and implemented proper
+ object handles in the hunspell XS glue. Again, thanks to
+ Paul Flo Williams for patch and test case. Closes RT#84054.
+
+ Implemented new add_dic() function from hunspell API.
+ Fixes RT#83765. Thanks to Paul Flo Williams for patch
+ and test case.
+
+ Fixed RT#79630 incorrect encoding of Hunspell.pm POD documentation.
+ Thanks to Paul for the patch.
+
+ Fixed t/02_pod.t test due to newest Test::Pod and
+ missing =encoding directive. Thanks to SHLOMIF for
+ the patch.
+
+-------------------------------------------------------------------
Old:
----
Text-Hunspell-2.03.tar.gz
New:
----
Text-Hunspell-2.08.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Text-Hunspell.spec ++++++
--- /var/tmp/diff_new_pack.NfgED7/_old 2013-06-06 12:57:51.000000000 +0200
+++ /var/tmp/diff_new_pack.NfgED7/_new 2013-06-06 12:57:51.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package perl-Text-Hunspell
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,25 +15,30 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
Name: perl-Text-Hunspell
-Version: 2.03
+Version: 2.08
Release: 0
%define cpan_name Text-Hunspell
-Summary: Perl interface to the GNU Hunspell library
-License: Artistic-1.0 or GPL-1.0+
+Summary: Perl interface to the Hunspell library
+License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Text-Hunspell/
-Source:
http://www.cpan.org/authors/id/C/CO/COSIMO/Text-Hunspell-%{version}.tar.gz
+Source:
http://www.cpan.org/authors/id/C/CO/COSIMO/%{cpan_name}-%{version}.tar.gz
+# MANUAL BEGIN
Patch0: fix-makefile.diff
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: hunspell-devel
+# MANUAL END
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+#BuildRequires: perl(Devel::CheckLib)
+#BuildRequires: perl(Text::Hunspell)
%{perl_requires}
%description
-This module provides a Perl interface to the OO *Hunspell* library. This
+This module provides a Perl interface to the *Hunspell* library. This
module is to meet the need of looking up many words, one at a time, in a
single session, such as spell-checking a document in memory.
@@ -41,9 +46,12 @@
%prep
%setup -q -n %{cpan_name}-%{version}
+# MANUAL BEGIN
%patch0 -p1
hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
+# MANUAL END
+find . -type f -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@@ -57,11 +65,8 @@
%perl_process_packlist
%perl_gen_filelist
-%clean
-%{__rm} -rf %{buildroot}
-
%files -f %{name}.files
-%defattr(644,root,root,755)
-%doc Changes perlobject.map README
+%defattr(-,root,root,755)
+%doc Changes examples perlobject.map README
%changelog
++++++ Text-Hunspell-2.03.tar.gz -> Text-Hunspell-2.08.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/Changes
new/Text-Hunspell-2.08/Changes
--- old/Text-Hunspell-2.03/Changes 2011-06-24 11:15:26.000000000 +0200
+++ new/Text-Hunspell-2.08/Changes 2013-05-01 23:24:29.000000000 +0200
@@ -1,5 +1,34 @@
Revision history for Perl extension Text::Hunspell.
+2.08 2013/05/01 23:22:35 Europe/Oslo (cosimo)
+
+ Improved main POD documentation for Hunspell.pm.
+ Fixes RT#84964. Thanks to Paul Flo Williams for the patch.
+ (https://github.com/cosimo/perl5-text-hunspell/pull/2)
+
+2.07 2013/03/26 20:45:00 Europe/Oslo (cosimo)
+
+ DEPRECATED the delete() method, and implemented proper
+ object handles in the hunspell XS glue. Again, thanks to
+ Paul Flo Williams for patch and test case. Closes RT#84054.
+
+2.06 2013/03/09 11:39:28 Europe/Oslo (cosimo)
+
+ Implemented new add_dic() function from hunspell API.
+ Fixes RT#83765. Thanks to Paul Flo Williams for patch
+ and test case.
+
+2.05 2012/09/21 08:17:00 (cosimo)
+
+ Fixed RT#79630 incorrect encoding of Hunspell.pm POD documentation.
+ Thanks to Paul for the patch.
+
+2.04 2012/09/20 23:05:00 (cosimo)
+
+ Fixed t/02_pod.t test due to newest Test::Pod and
+ missing =encoding directive. Thanks to SHLOMIF for
+ the patch.
+
2.03 2011/06/24 11:12:00 (cosimo)
Fixed use of "qw()" as parenthesis in inc/Devel/CheckLib.pm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/Hunspell.pm
new/Text-Hunspell-2.08/Hunspell.pm
--- old/Text-Hunspell-2.03/Hunspell.pm 2011-06-24 11:21:51.000000000 +0200
+++ new/Text-Hunspell-2.08/Hunspell.pm 2013-05-01 23:22:19.000000000 +0200
@@ -5,7 +5,7 @@
use vars qw/ @ISA $VERSION /;
@ISA = 'DynaLoader';
-$VERSION = '2.03';
+$VERSION = '2.08';
bootstrap Text::Hunspell $VERSION;
@@ -14,19 +14,14 @@
1;
__END__
+=encoding utf8
+
=head1 NAME
-Text::Hunspell - Perl interface to the GNU Hunspell library
+Text::Hunspell - Perl interface to the Hunspell library
=head1 SYNOPSIS
- # For this example to work, you have to have
- # the US english dictionary installed!
-
- use strict;
- use warnings;
-
- use Data::Dumper ();
use Text::Hunspell;
# You can use relative or absolute paths.
@@ -51,55 +46,13 @@
print " - $_\n";
}
- # Analysis of a word
- $word = 'automatic';
- my $analysis = $speller->analyze($word);
- print "\n", "Analysis of '$word' returns '$analysis'\n";
-
- # Word stemming
- $word = 'development';
- my @stemming = $speller->stem($word);
- print "\n", "Stemming of '$word' returns:\n";
- for (@stemming) {
- print " - $_\n";
- }
-
- #------------------------------------------
- # ADVANCED STUFF FROM HERE
- # NOT SURE HOW IT SHOULD WORK
- #------------------------------------------
-
- #
- # Test here generator for morphological modification (NOM->ACC)
- #
- $word = 'developer';
- my $stem = 'computer';
- @suggestions = $speller->analyze($stem);
- # Modify analyze output for required class (ACC)
- for (@suggestions) {
- s/NOM/ACC/g;
- }
- # Generate ACC class of stem
- @suggestions = $speller->generate2($stem, \@suggestions);
- print "Morphological modification generator...\n";
- print Data::Dumper::Dumper(\@suggestions);
-
-
- #
- # Test generator for morphological modification,
- # modify $stem like $word
- #
- @suggestions = $speller->generate($stem, $word);
- print "Morphological modification generator...\n";
- print Data::Dumper::Dumper(\@suggestions);
-
- # Deletes the underlying Hunspell C/C++ object
- $speller->delete($speller);
+ # Add dictionaries later
+ $speller->add_dic('dictionary_file.dic');
=head1 DESCRIPTION
-This module provides a Perl interface to the OO B<Hunspell> library.
+This module provides a Perl interface to the B<Hunspell> library.
This module is to meet the need of looking up many words,
one at a time, in a single session, such as spell-checking
a document in memory.
@@ -108,7 +61,7 @@
=head1 DEPENDENCIES
-B<You MUST have installed GNU Hunspell library version 1.0 or higher>
+B<You MUST have installed the Hunspell library version 1.0 or higher>
on your system before installing this C<Text::Hunspell> Perl module.
Hunspell location is:
@@ -131,82 +84,113 @@
The following methods are available:
-=head2 C<Text::Hunspell->new($full_path_to_affix, $full_path_to_dic)>
+=head2 Text::Hunspell->new($full_path_to_affix, $full_path_to_dic)
Creates a new speller object. Parameters are:
=over 4
-=item full path of affix file
+=item full path of affix (.aff) file
-=item full path of dictionary (dic) file
+=item full path of dictionary (.dic) file
=back
Returns C<undef> if the object could not be created, which is unlikely.
-=head2 C<check($word)>
+=head2 add_dic($path_to_dic)
+
+Adds a new dictionary to the current C<Text::Hunspell> object. This dictionary
+will use the same affix file as the original dictionary, so this is like using
+a personal word list in a given language. To check spellings in several
+different languages, use multiple C<Text::Hunspell> objects.
+
+=head2 check($word)
Check the word. Returns 1 if the word is found, 0 otherwise.
-=head2 C<suggest($misspelled_word)>
+=head2 suggest($misspelled_word)
Returns the list of suggestions for the misspelled word.
-=head2 C<analyze($word)>
+The following methods are used for morphological analysis, which is looking
+at the structure of words; parts of speech, inflectional suffixes and so on.
+However, most of the dictionaries that Hunspell can use are missing this
+information and only contain affix flags which allow, for example, 'cat' to
+turn into 'cats' but not 'catability'. (Users of the French and Hungarian
+dictionaries will find that they have more information available.)
+
+=head2 analyze($word)
+
+Returns the analysis list for the word. This will be a list of
+strings that contain a stem word and the morphological information
+about the changes that have taken place from the stem. This will
+most likely be 'fl:X' strings that indicate that affix flag 'X'
+was applied to the stem. Words may have more than one stem, and
+each one will be returned as a different item in the list.
+
+However, with a French dictionary loaded, C<analyze('chanson')> will return
+
+ st:chanson po:nom is:fem is:sg
-Returns the analysis list for the word.
-TODO HOW? What does it return??
+to tell you that "chanson" is a feminine singular noun, and
+C<analyze('chansons')> will return
-See the examples in the examples/ folder for now.
+ st:chanson po:nom is:fem is:pl
-=head2 C<stem($word)>
+to tell you that you've analyzed the plural of the same noun.
-Returns the stem list for the word.
+=head2 stem($word)
-=head2 C<generate2($stem, \@suggestions)>
+Returns the stem list for the word. This is a simpler version of the
+results from C<analyze()>.
+
+=head2 generate2($stem, \@suggestions)
Returns a morphologically modified stem as defined in
C<@suggestions> (got by analysis).
-TODO Explain ...
+With a French dictionary:
-=head2 C<generate($stem, $word)>
+ $feminine_form = 'chanteuse';
+ @ana = $speller->analyze($feminine_form);
+ $ana[0] =~ s/is:fem/is:mas/;
+ print $speller->generate2($feminine_form, \@ana)
-Returns morphologically modified stem like $word.
+will print 'chanteur'.
-TODO WHY IS THIS DIFFERENT FROM generate2() ???
-EXPLAIN.
+=head2 generate($stem, $word)
-=head2 C<$speller->delete($speller)>
+Returns morphologically modified stem like $word.
-Deletes the speller class.
+ $french_speller->generate('danseuse', 'chanteur');
+
+tells us that the masculine form of 'danseuse' is 'danseur'.
-TODO WHY IS THIS NEEDED?? Called on C<$speller> and needs C<$speller> ???
=head1 BUGS
Probably. Yes, definitely.
-=head1 COPYRIGHT
+=head1 LICENSE
This library is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
=head1 AUTHORS
- Eleonora, E<lt>eleonora46_at_gmx_dot_netE<gt>
-
-Current maintainer is:
+Originally written by
+Eleonora, E<lt>eleonora46_at_gmx_dot_netE<gt>.
- Cosimo Streppone, E<lt>[email protected]<gt>
+The current maintainer is
+Cosimo Streppone, E<lt>[email protected]<gt>
-This module is based on a L<Text::Aspell>
+This module is based on L<Text::Aspell>
written by Bill Moseley moseley at hank dot org.
Hunspell is written as myspell by Kevin B. Hendricks.
-Hunspell is maintained by N�meth L�szl�.
+Hunspell is maintained by Németh László.
Please see:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/Hunspell.xs
new/Text-Hunspell-2.08/Hunspell.xs
--- old/Text-Hunspell-2.03/Hunspell.xs 2010-09-06 18:05:46.000000000 +0200
+++ new/Text-Hunspell-2.08/Hunspell.xs 2013-03-26 20:44:44.000000000 +0100
@@ -19,16 +19,6 @@
/* $Id: Hunspell.xs,v 1.5 2002/08/29 20:28:00 moseley Exp $ */
-static Hunspell *handle;
-
-/* Needed for static initialization inside XS functions.
- A hack, yes, since 'THIS' is always empty it seems.
-*/
-static Hunspell * get_hunspell_handle () {
- assert(handle != NULL);
- return handle;
-}
-
static void * get_mortalspace ( size_t nbytes ) {
SV * mortal;
mortal = sv_2mortal( NEWSV(0, nbytes ) );
@@ -47,35 +37,37 @@
char *aff;
char *dic;
CODE:
- /* Store the new object as static shared handle.
- Every new will overwrite it. Ugly, but reasonable. */
- handle = new Hunspell(aff, dic);
- RETVAL = handle;
+ RETVAL = new Hunspell(aff, dic);
OUTPUT:
RETVAL
-
int
Hunspell::delete(h)
Hunspell *h;
CODE:
- delete h;
- /* If we deleted our shared static object (most likely)
- then remove the reference to it, so it doesn't get used */
- if (h == handle)
- handle = NULL;
-
- /* And return something to the caller too. */
+ warn("Text::Hunspell::delete() is deprecated and no replacement is
needed");
RETVAL = 1;
+ OUTPUT:
+ RETVAL
+void
+Hunspell::DESTROY()
+
+int
+Hunspell::add_dic(dic)
+ char *dic;
+ CODE:
+ RETVAL = THIS->add_dic(dic);
+
+ OUTPUT:
+ RETVAL
int
Hunspell::check(buf)
char *buf;
CODE:
- handle = get_hunspell_handle();
- RETVAL = handle->spell(buf);
+ RETVAL = THIS->spell(buf);
OUTPUT:
RETVAL
@@ -87,8 +79,7 @@
char **wlsti;
int i, val;
PPCODE:
- handle = get_hunspell_handle();
- val = handle->suggest(&wlsti, buf);
+ val = THIS->suggest(&wlsti, buf);
for (int i = 0; i < val; i++) {
PUSHs(sv_2mortal(newSVpv( wlsti[i] ,0 )));
free(wlsti[i]);
@@ -101,8 +92,7 @@
char **wlsti;
int i, val;
PPCODE:
- handle = get_hunspell_handle();
- val = handle->analyze(&wlsti, buf);
+ val = THIS->analyze(&wlsti, buf);
for (i = 0; i < val; i++) {
PUSHs(sv_2mortal(newSVpv(wlsti[i], 0)));
free(wlsti[i]);
@@ -116,8 +106,7 @@
char **wlsti;
int i, val;
PPCODE:
- handle = get_hunspell_handle();
- val = handle->stem(&wlsti, buf);
+ val = THIS->stem(&wlsti, buf);
for (int i = 0; i < val; i++) {
PUSHs(sv_2mortal(newSVpv( wlsti[i] ,0 )));
free(wlsti[i]);
@@ -132,8 +121,7 @@
char **wlsti;
int i, val;
PPCODE:
- handle = get_hunspell_handle();
- val = handle->generate(&wlsti, buf, sample);
+ val = THIS->generate(&wlsti, buf, sample);
for (int i = 0; i < val; i++) {
PUSHs(sv_2mortal(newSVpv( wlsti[i] ,0 )));
free(wlsti[i]);
@@ -162,8 +150,7 @@
array[i] = SvPV( *elem, PL_na );
}
- handle = get_hunspell_handle();
- val = handle->generate(&wlsti, buf, array, len);
+ val = THIS->generate(&wlsti, buf, array, len);
for (int i = 0; i < val; i++) {
PUSHs(sv_2mortal(newSVpv( wlsti[i] ,0 )));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/MANIFEST
new/Text-Hunspell-2.08/MANIFEST
--- old/Text-Hunspell-2.03/MANIFEST 2010-09-08 12:06:29.000000000 +0200
+++ new/Text-Hunspell-2.08/MANIFEST 2013-05-01 23:26:09.000000000 +0200
@@ -14,6 +14,9 @@
t/02-pod.t
t/05-core.t
t/06-analyze.t
+t/07-add-dictionary.t
+t/supp.dic
t/test.aff
t/test.dic
typemap
+META.json Module JSON meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/META.json
new/Text-Hunspell-2.08/META.json
--- old/Text-Hunspell-2.03/META.json 1970-01-01 01:00:00.000000000 +0100
+++ new/Text-Hunspell-2.08/META.json 2013-05-01 23:26:09.000000000 +0200
@@ -0,0 +1,50 @@
+{
+ "abstract" : "unknown",
+ "author" : [
+ "unknown"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter
version 2.120921",
+ "keywords" : [
+ "hunspell",
+ "spelling",
+ "spell-checker",
+ "text-processing"
+ ],
+ "license" : [
+ "unknown"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Text-Hunspell",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
+ "runtime" : {
+ "requires" : {}
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "repository" : {
+ "url" : "https://github.com/cosimo/perl5-text-hunspell"
+ }
+ },
+ "version" : "2.08"
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/META.yml
new/Text-Hunspell-2.08/META.yml
--- old/Text-Hunspell-2.03/META.yml 2011-06-24 11:26:27.000000000 +0200
+++ new/Text-Hunspell-2.08/META.yml 2013-05-01 23:26:09.000000000 +0200
@@ -1,20 +1,28 @@
---- #YAML:1.0
-name: Text-Hunspell
-version: 2.03
-abstract: ~
-author: []
-license: unknown
-distribution_type: module
-configure_requires:
- ExtUtils::MakeMaker: 0
+---
+abstract: unknown
+author:
+ - unknown
build_requires:
- ExtUtils::MakeMaker: 0
-requires: {}
-no_index:
- directory:
- - t
- - inc
-generated_by: ExtUtils::MakeMaker version 6.56
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 1
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version
2.120921'
+keywords:
+ - hunspell
+ - spelling
+ - spell-checker
+ - text-processing
+license: unknown
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Text-Hunspell
+no_index:
+ directory:
+ - t
+ - inc
+requires: {}
+resources:
+ repository: https://github.com/cosimo/perl5-text-hunspell
+version: 2.08
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/Makefile.PL
new/Text-Hunspell-2.08/Makefile.PL
--- old/Text-Hunspell-2.03/Makefile.PL 2011-05-23 03:48:47.000000000 +0200
+++ new/Text-Hunspell-2.08/Makefile.PL 2013-03-26 20:52:12.000000000 +0100
@@ -25,7 +25,8 @@
$possible_candidate ||= "/usr/lib/libhunspell-<ver>.so";
warn
"---------------------------------------------------------------------\n";
warn "Your system doesn't appear to have a libhunspell.$dlext link.\n";
- warn "Linking might fail. If it does, you might want to try:\n";
+ warn "Linking might fail. If it does, you might want to try installing\n";
+ warn "the libhunspell-dev package (or the equivalent on your OS) or
try:\n";
warn "\n";
warn " $Config{lns} $possible_candidate $def_lib.so\n";
warn
"---------------------------------------------------------------------\n";
@@ -50,5 +51,10 @@
PREREQ_PM => {}, # e.g., Module::Name => 1.1
XSOPT => '-C++',
TYPEMAPS => ['perlobject.map', 'typemap'],
+ META_MERGE => {
+ resources => {
+ repository => 'https://github.com/cosimo/perl5-text-hunspell',
+ },
+ keywords => [ qw(hunspell spelling spell-checker text-processing) ],
+ },
);
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/README
new/Text-Hunspell-2.08/README
--- old/Text-Hunspell-2.03/README 2010-09-08 11:59:25.000000000 +0200
+++ new/Text-Hunspell-2.08/README 2013-03-26 09:27:31.000000000 +0100
@@ -4,7 +4,12 @@
DESCRIPTION
-Text::Hunspell is an interface to the GNU Hunspell library. GNU Hunspell is a
Free and Open Source spell checker. The Text::Hunspell module is a thin XS
wrapper around the Hunspell C++ Library. Hopefully this is obvious, but you
MUST have the Hunspell library installed on your system as a .so library,
before installing this module. You also MUST have any hunspell dictionary
installed for "make test" to pass.
+Text::Hunspell is an interface to the GNU Hunspell library. GNU Hunspell is a
+Free and Open Source spell checker. The Text::Hunspell module is a thin XS
+wrapper around the Hunspell C++ Library. Hopefully this is obvious, but you
+MUST have the Hunspell library installed on your system as a .so library,
+before installing this module. You also MUST have any hunspell dictionary
+installed for "make test" to pass.
Hunspell's location is http://hunspell.sourceforge.net
@@ -221,8 +226,8 @@
Changes compared to Hunspell::text
-hunspell.h was modified, since classe Hunspell was heavily modified between
1.2.8 and 1.4.x, among others methods spell and suggest got new parameters,
that causes the function name to get modified from
-U _ZN8Hunspell5spellEPKc
-to
-U _ZN8Hunspell5spellEPKcPiPPc
+hunspell.h was modified, since classe Hunspell was heavily modified between
+1.2.8 and 1.4.x, among others methods spell and suggest got new parameters,
+that causes the function name to get modified from U _ZN8Hunspell5spellEPKc to
+U _ZN8Hunspell5spellEPKcPiPPc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/t/05-core.t
new/Text-Hunspell-2.08/t/05-core.t
--- old/Text-Hunspell-2.03/t/05-core.t 2010-09-06 17:34:27.000000000 +0200
+++ new/Text-Hunspell-2.08/t/05-core.t 2013-03-26 20:44:44.000000000 +0100
@@ -2,7 +2,7 @@
use warnings;
use Data::Dumper;
-use Test::More tests => 6;
+use Test::More tests => 5;
use Text::Hunspell;
my $speller = Text::Hunspell->new(qw(./t/test.aff ./t/test.dic));
@@ -30,7 +30,3 @@
\@suggestions => [ qw(lói ló lót) ],
q(List of suggestions should be correct)
);
-
-# Curtains down
-ok($speller->delete($speller), q(delete method presumably worked));
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/t/07-add-dictionary.t
new/Text-Hunspell-2.08/t/07-add-dictionary.t
--- old/Text-Hunspell-2.03/t/07-add-dictionary.t 1970-01-01
01:00:00.000000000 +0100
+++ new/Text-Hunspell-2.08/t/07-add-dictionary.t 2013-03-26
20:44:44.000000000 +0100
@@ -0,0 +1,26 @@
+use strict;
+use warnings;
+
+use Data::Dumper;
+use Test::More tests => 4;
+use Text::Hunspell;
+
+my $speller = Text::Hunspell->new(qw(./t/test.aff ./t/test.dic));
+die unless $speller;
+ok($speller, qq(Created a Text::Hunspell object [$speller]));
+
+my $word = q(munkey);
+ok(
+ !$speller->check($word),
+ qq(Word '$word' shouldn't be in the test dictionary)
+);
+
+ok(
+ !$speller->add_dic(q(./t/supp.dic)),
+ q(Added a supplemental dictionary)
+);
+
+ok(
+ $speller->check($word),
+ qq(Word '$word' is in the supplemental dictionary)
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/t/supp.dic
new/Text-Hunspell-2.08/t/supp.dic
--- old/Text-Hunspell-2.03/t/supp.dic 1970-01-01 01:00:00.000000000 +0100
+++ new/Text-Hunspell-2.08/t/supp.dic 2013-03-26 09:27:31.000000000 +0100
@@ -0,0 +1,2 @@
+1
+munkey
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Text-Hunspell-2.03/typemap
new/Text-Hunspell-2.08/typemap
--- old/Text-Hunspell-2.03/typemap 2006-07-08 14:30:11.000000000 +0200
+++ new/Text-Hunspell-2.08/typemap 2013-03-26 20:44:44.000000000 +0100
@@ -2,7 +2,6 @@
TYPEMAP
Hunspell * O_OBJECT
-Hunspell O_OBJECT
# From: "perlobject.map" Dean Roehrich, version 19960302
# O_OBJECT -> link an opaque C or C++ object to a blessed Perl object.
@@ -15,10 +14,8 @@
INPUT
O_OBJECT
-# warn(\" sv_isobject($arg) $arg SvTYPE(SvRV($arg)) SVt_PVMG $type\");
if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) )
-# $var = ($type)SvIV((SV*)SvRV( $arg ));
- $var = INT2PTR ($type, SvIV (SvRV ($arg)));
+ $var = ($type)SvIV((SV*)SvRV( $arg ));
else{
warn( \"${Package}::$func_name() -- $var is not a blessed SV
reference\" );
XSRETURN_UNDEF;
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]