
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
conllu-stream
Advanced tools
Using this module you can parse CoNLL-U files as a stream of sentence objects. You can also access the low-level line parser, if you want deeper control.
Node module to parse CoNLL-U file format as streams
Using this module you can parse CoNLL-U files as a stream of sentence objects. You can also access the low-level line parser, if you want deeper control. Example:
var conllu = require('conllu-stream');
require('fs').createReadStream('ud-treebanks-v2.0/UD_English/en-ud-train.conllu')
.pipe(conllu())
.on('data', function(sentence) {
console.log(sentence.toString());
});
npm install --save conllu-stream
The basic conllu()
transform stream emits sentence objects. They are instances of conllu.sentence.model.Sentence
. Properties:
'sentence'
sent_id
or text
Methods:
The conllu.line.stream()
is parsing each line of the input stream and emitting token objects. These are plain JSON objects with the properties depending on the type.
'sentence_boundary'
'sentence_feature'
sent_id
, text
or newpar
'comment'
'word'
, 'multiword'
, 'empty_node'
or 'unknown_node'
5.2
1
(word), 1-3
(multiword), 1.1
(empty_node)NOUN
, VERB
, PROPN
, etc.VMFIN
for finite modal verbs in Germanhead
word in dependency treeTransform stream takes conllu format as input stream and emits sentence objects as output object stream.
Code is licensed under MIT, please see license.md file for details.
FAQs
Using this module you can parse CoNLL-U files as a stream of sentence objects. You can also access the low-level line parser, if you want deeper control.
The npm package conllu-stream receives a total of 3 weekly downloads. As such, conllu-stream popularity was classified as not popular.
We found that conllu-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.