Code Monkey home page Code Monkey logo

NAME

PLN::PT - interface for the http://pln.pt web service

VERSION

version 0.008

SYNOPSIS

# using as a lib
my $pln = PLN::PT->new('http://api.pln.pt');
my $data = $pln->tagger($txt);  # [['A','o',''DA0FS0','0.675415'], ...

# using the pln-pt tool from the command line
$ echo "A Maria tem razão . " | pln-pt tagger
A o DA0FS0 0.675415
Maria maria NCFS000 1
tem ter VMIP3S0 0.999287
razão razão NCFS000 0.65
. . Fp 1

DESCRIPTION

This module implements an interface for the Natural Language Processing (NLP) web service provided by http://pln.pt.

METHODS

new

Create new object, given as argument the base endpoint for the web service.

Once the object is created, a set of methods described below can be used to access several operations in the API. All the methods return a data structure with the corresponding result, typically a list of tokens with some extra information depending on the operation used.

tokenizer

Tokenize the text given as argument, i.e. split the text in tokens (words by default), for more information on the tokenization operation visit http://pln.pt/api.

$ echo "A Maria tem razão ." | pln-pt tokenizer
A
Maria
tem
razão
.

morph_analyzer

Morphologic analysis for a single word, given as argument. For more information on the tagging operation visit http://pln.pt/api.

$ echo cavalo | pln-pt morph
cavalo cavalo NCMS000 0.914011 cavalar VMIP1S0 0.0859891

tagger

Part-of-speech tagging the tokens in the text, given as argument, for more information on the tagging operation visit http://pln.pt/api.

$ echo "A Maria tem razão ." | pln-pt tagger
A o DA0FS0 0.675415
Maria maria NCFS000 1
tem ter VMIP3S0 0.999287
razão razão NCFS000 0.65
. . Fp 1

dep_parser

Build a dependency tree for the text given as argument, for more information on the dependency tree visit http://pln.pt/api.

$ echo "A Maria tem razão ." | pln-pt dep_parser
1   A       _       DET     art|<artd>|F|S  (...)   2       det     _       _
2   Maria   _       PROPN   prop|F|S        (...)   3       nsubj   _       _
3   tem     _       VERB    v-fin|PR|3S|IND (...)   0       ROOT    _       _
4   razão   _       NOUN    n|F|S   (...)   3       dobj    _       _
5   .       _       PUNCT   punc    (...)   3       punct   _

tf

Compute term frequency given a text.

stopwords

Retrieve lists of stop words.

ACKNOWLEDGEMENTS

This work is partially supported by the project “SmartEGOV: Harnessing EGOV for Smart Governance (Foundations, methods, Tools) / NORTE-01-0145-FEDER-000037”, supported by Norte Portugal Regional Operational Programme (NORTE 2020), under the PORTUGAL 2020 Partnership Agreement, through the European Regional Development Fund (EFDR).

AUTHORS

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 - 2017 by Nuno Carvalho.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

PLN.pt's Projects

pln-pt icon pln-pt

Perl interface for the http://api.pln.pt webservice (not even beta)

plnpt icon plnpt

Python interface for the http://api.pln.pt webservice (not even beta)

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.