This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"title":"Economico","sortTitle":"Data","query":"filter=Source.Name eq | |
\"Economico\"&sort=_InternalRefs.RegisterDate&limit=20","destination":"main | |
","id":1430395633631,"idx":0,"domElement":{"0":{"jQuery11100528639918193221 | |
1":226,"sizzle-1434637889294":{"parentNode":[2289,18,false]}},"length":1,"p | |
revObject":{"0":{},"context":{},"length":1},"context":{}}},{"title":"Expres | |
so","sortTitle":"Data","query":"filter=Source.Name eq | |
\"Expresso\"&sort=_InternalRefs.RegisterDate&limit=20","destination":"main" | |
,"id":1430401119919,"idx":1,"domElement":{"0":{"jQuery111005593397612683475 | |
":225,"sizzle-1433410869016":{"parentNode":[3230,18,false]}},"length":1,"pr | |
evObject":{"0":{},"context":{},"length":1},"context":{}}},{"title":"Renasce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=$(dirname $0) | |
pubID="$1" | |
if [ -z "$pubID" ]; then | |
pubID='4090' | |
fi | |
FILE="$2" | |
if [ -z "$FILE" ]; then | |
FILE='4.png' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x70833BdAaBF2a0efa738C847a1E7bbda3e537B68 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongo = require('promised-mongo'); | |
const db = mongo('metacache', ['contents']); | |
const fs = require('fs-extra'); | |
const htmlToText = require('html-to-text'); | |
const Promise = require('bluebird'); | |
async function dumpDocs(filter, folder, fields){ | |
console.log('['+(new Date().toISOString())+'] Dumping',filter,'into '+folder); | |
const _filter = { | |
...filter, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CATEGORIES=(desporto economia) | |
mkdir -p dev train 'eval' | |
for c in "${CATEGORIES[@]}"; do | |
for i in $(find ./_/$c -type f | sort -R | head); do | |
j=$(basename $i) | |
mv $i dev/${c}_${j} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tm) | |
#################################### | |
# load the corpora and pre process # | |
#################################### | |
economia.train = VCorpus(DirSource('../news/train/economia'), readerControl = list(reader = readPlain, language='pt')) | |
desporto.train = VCorpus(DirSource('../news/train/desporto'), readerControl = list(reader = readPlain, language='pt')) | |
economia.test = VCorpus(DirSource('../news/eval/economia'), readerControl = list(reader = readPlain, language='pt')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################## | |
# classification # | |
################## | |
# decision trees | |
set.seed(15973) | |
dtree <- train(train.d, train.c.vector, method = 'rpart') | |
conf.mx.dt <- table(test.c, predict(dtree, test.d)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//IE Fix | |
if (typeof(NodeList.prototype.forEach)!==typeof(alert)) | |
{ | |
NodeList.prototype.forEach=Array.prototype.forEach; | |
} | |
function showContent(id){ | |
// get all .content elements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ext n=1 sec=clt sem=92b> | |
<t> | |
Um clt 92b um DET_arti 0 S M >N 0 0 0 1->2 ex-libris | |
revivalismo clt 92b revivalismo N 0 S M NPHR 0 0 0 2->0 ser | |
refrescante clt 92b refrescante ADJ 0 S M N< 0 0 0 3->2 TOPO | |
</t> | |
<p par=ext1-clt-92b-1> | |
<s> | |
O clt 92b o DET_artd 0 S M >N 0 0 0 1->5 ex-libris | |
7 clt 92b 7=e=meio NUM_card 0 S M SUBJ> 0 0 0 2->3 ser |