Skip to content

Instantly share code, notes, and snippets.

View arademaker's full-sized avatar
🎯
Focusing

Alexandre Rademaker arademaker

🎯
Focusing
View GitHub Profile
wordsensesense
crosswordsense-01913997-v-1wordsense-02023396-v-2
farsightednesswordsense-14555214-n-2wordsense-14554011-n-4
get_upwordsense-00018405-v-1wordsense-01974062-v-4
liftwordsense-01455184-v-2wordsense-01974062-v-2
raisewordsense-01975587-v-1wordsense-01974062-v-1
makewordsense-01646075-v-1wordsense-01645601-v-3
dowordsense-02561995-v-1wordsense-01645601-v-2
@arademaker
arademaker / output
Last active September 28, 2015 17:24
$ awk '{print $2, $2, $4, "#"}' train.pt | /media/data/src/freeling/src/utilities/train-tagger/bin/change-corpus-dict pt /usr/local/share/freeling/
O O DET # o DA0MS0 0.946534 o PD0MS000 0.0337339 o PP3MSA00 0.0197186 o NCMS000 1.38766e-05
objetivo objetivo NOUN # objetivo AQ0MS0 0.554567 objetivo NCMS000 0.390889 objetivo NP00000 0.0545441
dos dos ADP # de SPS00 1
principais principais ADJ # principal AQ0CP0 0.99061 principais NCMP000 0.00469484 principal NCMP000 0.00469484
hotéis hotéis NOUN # hotel NCMP000 1
da da ADP # de SPS00 1
cidade cidade NOUN # cidade NCFS000 1
é é VERB # ser VMIP3S0 1
que que CONJ # que PR0CN000 0.586684 que CS 0.39617 que PT0CN000 0.0167849 que PE0CN000 0.000361319
$ java -jar /usr/local/HermiT/HermiT.jar --classify test-complet.ttl
Exception in thread "main" org.semanticweb.owlapi.reasoner.InconsistentOntologyException: Inconsistent ontology
at org.semanticweb.HermiT.Reasoner.throwInconsistentOntologyExceptionIfNecessary(Unknown Source)
at org.semanticweb.HermiT.Reasoner.checkPreConditions(Unknown Source)
at org.semanticweb.HermiT.Reasoner.precomputeInferences(Unknown Source)
at org.semanticweb.HermiT.cli.CommandLine$ClassifyAction.run(Unknown Source)
at org.semanticweb.HermiT.cli.CommandLine.main(Unknown Source)
@arademaker
arademaker / commands
Last active August 29, 2015 14:27
playing with stardog and wordnet
stardog-admin server start
stardog-admin db drop wn
stardog-admin db create -n wn wn30.ttl
stardog data add wn test.ttl
stardog-admin icv add -v wn wn30.ttl
stardog icv validate -v -r wn ; the r option is necessary

Portuguese POS tagged corpora

Dados CoNLL-X

Este primeiro arquivo foi obtido do CoNLL-X Shared Task. É o arquivo de teste disponibilizado. A quarta coluna, V4, contém a tag.

@arademaker
arademaker / chickens.lisp
Last active August 29, 2015 14:14
chickens
;; utilities
(defun combinations (&rest lists)
(if (car lists)
(mapcan (lambda (inner-val)
(mapcar (lambda (outer-val)
(cons outer-val inner-val))
(car lists)))
(apply #'combinations (cdr lists)))
(list nil)))
@arademaker
arademaker / harem.dtd
Created November 3, 2014 15:17
DTD from the Golden Collection of the Second HAREM (http://www.linguateca.pt/harem/)
<?xml version="1.0" encoding="ISO-8859-1"?>
<!ELEMENT EM (#PCDATA) >
<!ATTLIST EM
ID CDATA #REQUIRED
CATEG CDATA #IMPLIED
TIPO CDATA #IMPLIED
COMENT CDATA #IMPLIED
SUBTIPO CDATA #IMPLIED >
@arademaker
arademaker / exemplos.hs
Created July 28, 2014 14:48
first example in Haskell
-- testing double without type information
double x = x + x
-- testing the first example
qsort :: Ord a => [a] -> [a]
qsort [] = []
qsort (p:xs) = (qsort lesser) ++ [p] ++ (qsort greater)
where
lesser = filter (< p) xs
greater = filter (>= p) xs
@arademaker
arademaker / processing.py
Created July 17, 2014 13:15
using freeling from Python
#!/opt/local/bin/python3.2
# -*- encoding: utf-8 -*-
import sys
import json
sys.path.append('.../myfreeling/APIs/python')
import freeling
import codecs
import re