CoNLL 2 JSON

No algorithm description given

Converts CoNLL-U to a JSON tree This converts CoNLL-U as defined at http://universaldependencies.org/format.html into a tree of JSON that's somewhat easier to work with.  CoNLL-U is more or less the version of CoNLL that Google's Parsey McParseface (based on tensorflow) outputs. if you look at the syntaxnet source, you'll see an example file demo.sh, which basically pipes three commands into each other.  If you remove the last pipe, the thing that comes out the other end will be conll format. |  bazel-bin/syntaxnet/conll2tree --task_context=$MODEL_DIR/context.pbtxt --alsologtostderr it should look like this 1 this _ DET DT _ 3 nsubj _ _ 2 is _ VERB VBZ _ 3 cop _ _ 3 CoNLL _ NOUN NNP _ 0 ROOT _ _ To use cURL, please call it like this: curl -X POST --data-binary @foo.txt -H 'Content-Type: application/text' -H 'Authorization: Simple your/auth+GOESHERE' https://api.algorithmia.com/v1/algo/corprew/conll2json/ the --data-binary flag is required in place of the -d or --data options to preserve the Tabs (this is TSV data) and line endings.  Most errors encountered using this are from not using the --data-binary flag.  If it's inconvenient for you, let me know and I can modify this to use data:// URLs. This will produce a handy JSON data structure as output: {"id":4,"form":"test","lemma":null,"upostag":"NOUN","xpostag":"NN","feats":null,"head":0,"deprel":"ROOT","deps":null,"misc":null,"children":[{"id":1,"form":"this","lemma":null,"upostag":"DET","xpostag":"DT","feats":null,"head":4,"deprel":"nsubj","deps":null,"misc":null,"children":[]},{"id":2,"form":"is","lemma":null,"upostag":"VERB","xpostag":"VBZ","feats":null,"head":4,"deprel":"cop","deps":null,"misc":null,"children":[]},{"id":3,"form":"a","lemma":null,"upostag":"DET","xpostag":"DT","feats":null,"head":4,"deprel":"det","deps":null,"misc":null,"children":[]},{"id":6,"form":"see","lemma":null,"upostag":"VERB","xpostag":"VB","feats":null,"head":4,"deprel":"infmod","deps":null,"misc":null,"children":[{"id":5,"form":"to","lemma":null,"upostag":"PRT","xpostag":"TO","feats":null,"head":6,"deprel":"aux","deps":null,"misc":null,"children":[]},{"id":10,"form":"comes","lemma":null,"upostag":"VERB","xpostag":"VBZ","feats":null,"head":6,"deprel":"advcl","deps":null,"misc":null,"children":[{"id":7,"form":"if","lemma":null,"upostag":"ADP","xpostag":"IN","feats":null,"head":10,"deprel":"mark","deps":null,"misc":null,"children":[]},{"id":9,"form":"parsing","lemma":null,"upostag":"NOUN","xpostag":"NN","feats":null,"head":10,"deprel":"nsubj","deps":null,"misc":null,"children":[{"id":8,"form":"the","lemma":null,"upostag":"DET","xpostag":"DT","feats":null,"head":9,"deprel":"det","deps":null,"misc":null,"children":[]}]},{"id":11,"form":"out","lemma":null,"upostag":"PRT","xpostag":"RP","feats":null,"head":10,"deprel":"prt","deps":null,"misc":null,"children":[]},{"id":15,"form":"right","lemma":null,"upostag":"ADV","xpostag":"RB","feats":null,"head":10,"deprel":"advmod","deps":null,"misc":null,"children":[{"id":12,"form":"more","lemma":null,"upostag":"ADJ","xpostag":"JJR","feats":null,"head":15,"deprel":"advmod","deps":null,"misc":null,"children":[{"id":13,"form":"or","lemma":null,"upostag":"CONJ","xpostag":"CC","feats":null,"head":12,"deprel":"cc","deps":null,"misc":null,"children":[]},{"id":14,"form":"less","lemma":null,"upostag":"ADV","xpostag":"RBR","feats":null,"head":12,"deprel":"conj","deps":null,"misc":null,"children":[]}]}]}]}]}]}

Tags
(no tags)

Cost Breakdown

1 cr
royalty per call
1 cr
usage per second
avg duration

Cost Calculator

API call duration (sec)
×
API calls
=
Estimated cost
per calls
for large volume discounts
For additional details on how pricing works, see Algorithmia pricing.

No permissions required

This algorithm does not require any special permissions.


To understand more about how algorithm permissions work, see the permissions documentation.

1. Type your input

2. See the result

Running algorithm...

3. Use this algorithm

curl -X POST -d '{{input | formatInput:"curl"}}' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/corprew/conll2JSON/0.1.1
View cURL Docs
algo auth
# Enter API Key: YOUR_API_KEY
algo run algo://corprew/conll2JSON/0.1.1 -d '{{input | formatInput:"cli"}}'
View CLI Docs
import com.algorithmia.*;
import com.algorithmia.algo.*;

String input = "{{input | formatInput:"java"}}";
AlgorithmiaClient client = Algorithmia.client("YOUR_API_KEY");
Algorithm algo = client.algo("algo://corprew/conll2JSON/0.1.1");
AlgoResponse result = algo.pipeJson(input);
System.out.println(result.asJsonString());
View Java Docs
import com.algorithmia._
import com.algorithmia.algo._

val input = {{input | formatInput:"scala"}}
val client = Algorithmia.client("YOUR_API_KEY")
val algo = client.algo("algo://corprew/conll2JSON/0.1.1")
val result = algo.pipeJson(input)
System.out.println(result.asJsonString)
View Scala Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://corprew/conll2JSON/0.1.1")
           .pipe(input)
           .then(function(output) {
             console.log(output);
           });
View Javascript Docs
var input = {{input | formatInput:"javascript"}};
Algorithmia.client("YOUR_API_KEY")
           .algo("algo://corprew/conll2JSON/0.1.1")
           .pipe(input)
           .then(function(response) {
             console.log(response.get());
           });
View NodeJS Docs
import Algorithmia

input = {{input | formatInput:"python"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('corprew/conll2JSON/0.1.1')
print algo.pipe(input)
View Python Docs
library(algorithmia)

input <- {{input | formatInput:"r"}}
client <- getAlgorithmiaClient("YOUR_API_KEY")
algo <- client$algo("corprew/conll2JSON/0.1.1")
result <- algo$pipe(input)$result
print(result)
View R Docs
require 'algorithmia'

input = {{input | formatInput:"ruby"}}
client = Algorithmia.client('YOUR_API_KEY')
algo = client.algo('corprew/conll2JSON/0.1.1')
puts algo.pipe(input).result
View Ruby Docs
use algorithmia::*;

let input = {{input | formatInput:"rust"}};
let client = Algorithmia::client("YOUR_API_KEY");
let algo = client.algo('corprew/conll2JSON/0.1.1');
let response = algo.pipe(input);
View Rust Docs
Discussion
  • {{comment.username}}