UNPKG

cetem-publico

Version:

A wrapper for CETEMPúblico, an European Portuguese corpus of news extracts from the newspaper Público, with 180 million words tagged automatically using PALAVRAS.

37 lines (30 loc) 768 B
const CETEMPublico = require('./lib/cetem-publico'); const file = '/home/andrefs/Desktop/trash_buffer/CETEMPublico/CETEMPublicoAnotado2019.gz'; //const cp = new CETEMPublico(file, {gz: true}); const cp = new CETEMPublico(); async function printLines(){ for await (const line of cp.lines()){ console.log(line); } } async function printTokens(){ for await (const token of cp.tokens()){ console.log(token.toString()); } } // async function printStuff(){ // for await (const thing of cp.process('ext')){ // console.log(thing.toString()); // } // } async function printStuff(){ let i = 0; for await (const thing of cp.sentences()){ i++; console.log(thing); console.log(i); } } //printLines(); //printTokens(); printStuff();