forked from pool/perl-String-Approx
Compare commits
10 Commits
f18ed74187
...
e5a752b306
Author | SHA256 | Date | |
---|---|---|---|
e5a752b306 | |||
|
dc148f6089 | ||
|
1f9944e986 | ||
d5cee43813 | |||
|
556e606355 | ||
|
8aab2c9486 | ||
|
3d72d4601e | ||
|
8aa10437d3 | ||
|
29e44169a2 | ||
|
9adaa34099 |
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ed2dec04fce448c609a7a3d9148d8bf01ceecf76695830a39b42b4f4b498887
|
||||
size 39911
|
3
String-Approx-3.28.tar.gz
Normal file
3
String-Approx-3.28.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:43201e762d8699cb0ac2c0764a5454bdc2306c0771014d6c8fba821480631342
|
||||
size 45093
|
28
cpanspec.yml
Normal file
28
cpanspec.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
#description_paragraphs: 3
|
||||
#description: |-
|
||||
# override description from CPAN
|
||||
#summary: override summary from CPAN
|
||||
#no_testing: broken upstream
|
||||
#sources:
|
||||
# - source1
|
||||
# - source2
|
||||
#patches:
|
||||
# foo.patch: -p1
|
||||
# bar.patch:
|
||||
#preamble: |-
|
||||
# BuildRequires: gcc-c++
|
||||
#post_prep: |-
|
||||
# hunspell=`pkg-config --libs hunspell | sed -e 's,-l,,; s, *,,g'`
|
||||
# sed -i -e "s,hunspell-X,$hunspell," t/00-prereq.t Makefile.PL
|
||||
#post_build: |-
|
||||
# rm unused.files
|
||||
#post_install: |-
|
||||
# sed on %{name}.files
|
||||
license: LGPL-2.0 OR Artistic-2.0
|
||||
#skip_noarch: 1
|
||||
#custom_build: |-
|
||||
#./Build build flags=%{?_smp_mflags} --myflag
|
||||
#custom_test: |-
|
||||
#startserver && make test
|
||||
#ignore_requires: Bizarre::Module
|
@@ -1,3 +1,39 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 17 06:36:07 UTC 2017 - coolo@suse.com
|
||||
|
||||
- updated to 3.28
|
||||
see /usr/share/doc/packages/perl-String-Approx/ChangeLog
|
||||
|
||||
2017-04-16 Jarkko Hietaniemi <jhi@iki.fi>
|
||||
|
||||
* Resolve https://rt.cpan.org/Public/Bug/Display.html?id=121033
|
||||
Fails tests with no '.' in @INC
|
||||
|
||||
* Released as 3.28.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 26 15:38:16 UTC 2013 - pgajdos@suse.com
|
||||
|
||||
- updated to 3.27:
|
||||
* Resolve https://rt.cpan.org/Ticket/Display.html?id=69029
|
||||
Do not die (adist()) on empty pattern string.
|
||||
* Resolve https://rt.cpan.org/Ticket/Display.html?id=36707
|
||||
Do not die on undefined inputs, just return undef.
|
||||
* Resolve https://rt.cpan.org/Ticket/Display.html?id=82341
|
||||
Explicitly specify the licensing to be Artistic 2 or LGPL 2.
|
||||
* Modernize all the tests to use Test::More.
|
||||
* Add some tests for UTF-8 inputs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 29 09:42:07 UTC 2012 - pgajdos@suse.com
|
||||
|
||||
- Artistic-1.0 or GPL-2.0+ license
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 29 09:33:54 UTC 2012 - pgajdos@suse.com
|
||||
|
||||
- Artistic-1.0 and GPL-2.0+ license
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 1 13:35:19 UTC 2010 - coolo@novell.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package perl-String-Approx (Version 3.26)
|
||||
# spec file for package perl-String-Approx
|
||||
#
|
||||
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX 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,41 +15,76 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: perl-String-Approx
|
||||
%define cpan_name %( echo %{name} | %{__sed} -e 's,perl-,,' )
|
||||
Version: 3.28
|
||||
Release: 0
|
||||
%define cpan_name String-Approx
|
||||
Summary: Perl extension for approximate matching (fuzzy matching)
|
||||
Version: 3.26
|
||||
Release: 1
|
||||
License: Artistic License; GPL v2 or later
|
||||
License: LGPL-2.0 OR Artistic-2.0
|
||||
Group: Development/Libraries/Perl
|
||||
Url: http://search.cpan.org/dist/String-Approx
|
||||
Source0: %{cpan_name}-%{version}.tar.bz2
|
||||
Url: http://search.cpan.org/dist/String-Approx/
|
||||
Source0: https://cpan.metacpan.org/authors/id/J/JH/JHI/%{cpan_name}-%{version}.tar.gz
|
||||
Source1: cpanspec.yml
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: perl(Test::More)
|
||||
%{perl_requires}
|
||||
Requires: perl(Test::More)
|
||||
|
||||
%description
|
||||
String::Approx lets you match and substitute strings approximately.
|
||||
With this you can emulate errors: typing errorrs, speling errors,
|
||||
closely related vocabularies (colour color),
|
||||
genetic mutations (GAG ACT), abbreviations (McScot, MacScot).
|
||||
String::Approx lets you match and substitute strings approximately. With
|
||||
this you can emulate errors: typing errorrs, speling errors, closely
|
||||
related vocabularies (colour color), genetic mutations (GAG ACT),
|
||||
abbreviations (McScot, MacScot).
|
||||
|
||||
NOTE: String::Approx suits the task of string matching,
|
||||
not string comparison, and it works for strings, not for text.
|
||||
NOTE: String::Approx suits the task of *string matching*, not *string
|
||||
comparison*, and it works for *strings*, not for *text*.
|
||||
|
||||
Authors: Jarkko Hietaniemi <jhi@iki.fi>
|
||||
If you want to compare strings for similarity, you probably just want the
|
||||
Levenshtein edit distance (explained below), the Text::Levenshtein and
|
||||
Text::LevenshteinXS modules in CPAN. See also Text::WagnerFischer and
|
||||
Text::PhraseDistance. (There are functions for this in String::Approx, e.g.
|
||||
adist(), but their results sometimes differ from the bare Levenshtein et
|
||||
al.)
|
||||
|
||||
If you want to compare things like text or source code, consisting of
|
||||
*words* or *tokens* and *phrases* and *sentences*, or *expressions* and
|
||||
*statements*, you should probably use some other tool than String::Approx,
|
||||
like for example the standard UNIX diff(1) tool, or the Algorithm::Diff
|
||||
module from CPAN.
|
||||
|
||||
The measure of *approximateness* is the _Levenshtein edit distance_. It is
|
||||
the total number of "edits": insertions,
|
||||
|
||||
word world
|
||||
|
||||
deletions,
|
||||
|
||||
monkey money
|
||||
|
||||
and substitutions
|
||||
|
||||
sun fun
|
||||
|
||||
required to transform a string to another string. For example, to transform
|
||||
_"lead"_ into _"gold"_, you need three edits:
|
||||
|
||||
lead gead goad gold
|
||||
|
||||
The edit distance of "lead" and "gold" is therefore three, or 75%.
|
||||
|
||||
*String::Approx* uses the Levenshtein edit distance as its measure, but
|
||||
String::Approx is not well-suited for comparing strings of different
|
||||
length, in other words, if you want a "fuzzy eq", see above. String::Approx
|
||||
is more like regular expressions or index(), it finds substrings that are
|
||||
close matches.>
|
||||
|
||||
%prep
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
@@ -60,12 +95,9 @@ CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root)
|
||||
%doc Artistic ChangeLog README
|
||||
%defattr(-,root,root,755)
|
||||
%doc ChangeLog COPYRIGHT COPYRIGHT.agrep LGPL PROBLEMS README README.apse
|
||||
%license Artistic
|
||||
|
||||
%changelog
|
||||
|
||||
|
Reference in New Issue
Block a user