Docker Imagem: https://hub.docker.com/r/artpar/languagecrunch/
Puxe e execute a imagem do Docker, ouvindo na porta 8080:
$ docker run -it -p 8080:8080 artpar/languagecrunch
Exemplo de chamada da API:
$ curl http://localhost:8080/nlp/parse ? ` echo -n " The new twitter is so weird. Seriously. Why is there a new twitter? What was wrong with the old one? Fix it now. " | python -c " import urllib, sys; print(urllib.urlencode({'sentence': sys.stdin.read()})) " ` GET http://localhost:8080/nlp/parse?sentence=<URL-encoded sentences>
GET http://localhost:8080/nlp/word?word=ask&pos=v
GET http://localhost:8080/nlp/coref?sentence=<URL-encoded sentences>
sentence: The new twitter is so weird. Seriously. Why is there a new twitter? What was wrong with the old one? Fix it now.
{
"relations" : [],
"sentences" : [
{
"sentence" : " The new twitter is so weird. " ,
"sentence_type" : " assertive " ,
"sentiment" : {
"polarity" : -0.18181818181818182 ,
"subjectivity" : 0.7272727272727273
},
"root" : {
"text" : " is " ,
"orth" : 2
},
"pos" : [
{
"text" : " The new twitter " ,
"lemma" : " the " ,
"pos" : " DET " ,
"tag" : " DT " ,
"dep" : " nsubj " ,
.
.
. Eg: Bill Gates, the founder of Microsoft, hosted a party last night
"entities" : [
{
"text" : " Bill Gates " ,
"label" : " PERSON "
},
{
"text" : " Microsoft " ,
"label" : " ORG "
},
{
"text" : " last night " ,
"label" : " TIME "
}
]
} Eg: Bill Gates, the founder of Microsoft, hosted a party last night
"relations": [
{
"subject": "the founder",
"object": "Microsoft",
"relation": "ORG"
}
],
Eg: Apple is looking at buying UK startup for $1 billion
{
subject: "N/A",
object: "U.K. startup",
relation: "GPE"
},
{
subject: "buying",
object: "$1 billion",
relation: "MONEY"
}
],
Categoria de palavra
Palavras específicas de uma categoria
Sinônimos para combinar
Exemplos
Quadros de palavras (como a palavra é usada)
Resolução de Coreferência
Pronomes/referências a substantivos
Eg: startle, verb
"results" : [
{
"definition" : " to stimulate to action " ,
"examples" : [
" ..startled him awake " ,
" galvanized into action "
],
"lemma_names" : [
" startle " ,
" galvanize " ,
" galvanise "
],
"hypernyms" : [
{
"definition" : " surprise greatly; knock someone's socks off " ,
"examples" : [
" I was floored when I heard that I was promoted "
],
"lemma_names" : [
" shock " ,
" floor " ,
" ball_over " ,
" blow_out_of_the_water " ,
" take_aback "
]
}
],
"lemmas" : [
{
"frame_strings" : [
" Somebody startle somebody " ,
" Something startle somebody " ,
" Somebody startle somebody into V-ing something "
],Lista de colaboradores