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.
(defun normalize-agents () | |
(labels ((compare-agents (agent1 agent2) | |
(let ((u1 (nth 0 agent1)) | |
(u2 (nth 0 agent2))) | |
(if (upi= u1 u2) | |
(list u1 u2 0) | |
(list u1 u2 | |
(loop for i in (cdr agent1) | |
for j in (cdr agent2) | |
summing (numeric-upi-equal i j) into total |
(ql:quickload :drakma) | |
(ql:quickload :st-json) | |
(defun show-google-hits (term key ck) | |
(let* ((query (list (cons "key" key) | |
(cons "cx" ck) | |
(cons "q" term))) | |
(stream (drakma:http-request "https://www.googleapis.com/customsearch/v1" | |
:parameters query |
(let ((data (make-array 20 :initial-element nil))) | |
(values(read-sequence data (make-string-input-stream "testing things")) data)) | |
(defun fib1 (n) | |
(cond | |
((equal n 0) 0) | |
((equal n 1) 1) | |
(t (+ (fib1 (- n 1)) | |
(fib1 (- n 2)))))) | |
(defun fib2 (n) | |
(labels ((calc-fib (n a b) |
# Solucao baseada no pseudo-codigo apresentado em: | |
# http://en.wikipedia.org/wiki/Stable_marriage_problem | |
stable.match <- function(hprefs, mprefs, debug=FALSE){ | |
proposed <- matrix(rep(FALSE,25), ncol = 5, dimnames = list(Homens = 1:5, Mulheres = 1:5)) | |
alloc <- matrix(rep(FALSE,25), ncol = 5, dimnames = list(Homens = 1:5, Mulheres = 1:5)) | |
# os nomes das linhas e colunas irao ser usados para indicar os | |
# indices para selecao de elementos das matrizes proposed e alloc, | |
# por isso precisam ser renomeados. |
; first version: procedural | |
(defun nth-1 (n alist) | |
(let ((current alist)) | |
(dotimes (v n current) | |
(if (equal v n) | |
(car current) | |
(setf current (cdr current)))))) | |
; second version: functional |
-- 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 |
<?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 > |
;; 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))) |
Este primeiro arquivo foi obtido do CoNLL-X Shared Task. É o arquivo
de teste disponibilizado. A quarta coluna, V4
, contém a tag.