Code Monkey home page Code Monkey logo

perl-wiktionary-parser's People

Contributors

clbecker avatar jj avatar neilb avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

perl-wiktionary-parser's Issues

Errors from t/03_parsing.t

The module doesn't install very well:

t/03_parsing.t ............. 1/? 
#   Failed test 'section's normalized language is Gaelic'
#   at t/03_parsing.t line 114.
#          got: 'Scottish Gaelic'
#     expected: 'Gaelic'

#   Failed test 'lexeme's tagged normalized language name is Gaelic'
#   at t/03_parsing.t line 126.
#          got: 'Scottish Gaelic'
#     expected: 'Gaelic'
# Looks like you failed 2 tests of 12.
t/03_parsing.t ............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/12 subtests 

Senses not being added to pronunciations

At present senses are not being added to pronunciation objects. Adding the line

senses => $args{senses}, 

to the sub Wiktionary::Parser::Section::Pronunciation::add_pronunciation seems to fix this.

sub Wiktionary::Parser::Section::Pronunciation::add_pronunciation {
    my $self = shift;
    my %args = @_;

    my $meta = {};
    my $lang = $args{language} || '__language_undefined__';

    my $pronunciation = Wiktionary::Parser::Section::Pronunciation::Representation->new( 
        representation => $args{representation},
        pronunciation  => $args{pronunciation},
        context => $args{context},
        senses => $args{senses},
    );
    push @{$self->{pronunciation}{$lang}},$pronunciation;
}

Can't call method "get_sections" on an undefined value

I ran this script and received this issue perhaps 1/5 times. Not sure how this gets caught.

Can't call method "get_sections" on an undefined value at /usr/local/share/perl/5.20.2/Wiktionary/Parser/Document.pm line 358.
    Wiktionary::Parser::Document::get_classifications(Wiktionary::Parser::Document=HASH(0x3a365b0), "class", "Wiktionary::Parser::Section::Synonym") called at /usr/local/share/perl/5.20.2/Wiktionary/Parser/Document.pm line 297

Sometimes Perl would cite this line as a problem:

Can't call method "get_synonyms" on an undefined value
my $synonyms = $document->get_synonyms();

Put version in quotes

If you put the version number in quotes:

our $VERSION = '0.11';

you won't see the problem where version 0.10 gets turned into 0.1 as seen in the repository.

# Failed test 'use Wiktionary::Parser;' # at t/00-load.t line 6.

#   Failed test 'use Wiktionary::Parser;'
#   at t/00-load.t line 6.
#     Tried to use 'Wiktionary::Parser'.
#     Error:  Bareword "Locale::Codes::Language::LOCALE_LANG_ALPHA_3" not al
# Compilation failed in require at /home/djg/.cpanplus/5.14.2/build/Wiktiona
# BEGIN failed--compilation aborted at /home/djg/.cpanplus/5.14.2/build/Wikt
# Compilation failed in require at /home/djg/.cpanplus/5.14.2/build/Wiktiona
# BEGIN failed--compilation aborted at /home/djg/.cpanplus/5.14.2/build/Wikt
# Compilation failed in require at /home/djg/.cpanplus/5.14.2/build/Wiktiona
# BEGIN failed--compilation aborted at /home/djg/.cpanplus/5.14.2/build/Wikt
# Compilation failed in require at (eval 4) line 2.
# BEGIN failed--compilation aborted at (eval 4) line 2.
# Testing Wiktionary::Parser , Perl 5.014002, /usr/bin/perl
# Looks like you failed 1 test of 1.
FAILED--Further testing stopped.
make: *** [test_dynamic] Error 1  

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.