Skip to content

Instantly share code, notes, and snippets.

com
para
self
molt
dos
default
log
anti
till
mid
@jimregan
jimregan / gist:3664345
Created September 7, 2012 08:29
some lexicalisations from Pan Tadeusz
<http://dbpedia.org/resource/Mary_%28mother_of_Jesus%29> <http://lexvo.org/ontology#label> "Holy Virgin"@en .
<http://dbpedia.org/resource/Cz%C4%99stochowa> <http://lexvo.org/ontology#label> "Czenstochowa"@en .
<http://dbpedia.org/resource/Gate_of_Dawn> <http://lexvo.org/ontology#label> "Ostra Gate"@en .
<http://dbpedia.org/resource/Vilnius> <http://lexvo.org/ontology#label> "Wilno"@en .
<http://dbpedia.org/resource/Tadeusz_Ko%C5%9Bciuszko> <http://lexvo.org/ontology#label> "Kosciuszko"@en .
<http://dbpedia.org/resource/Jakub_Jasi%C5%84ski> <http://lexvo.org/ontology#label> "Jasinski"@en .
<http://dbpedia.org/resource/Poland_Is_Not_Yet_Lost> <http://lexvo.org/ontology#label> "Dombrowski's old mazurka"@en .
<http://dbpedia.org/resource/Kontusz> <http://lexvo.org/ontology#label> "kontusz"@en .
<http://dbpedia.org/resource/Seneschal> <http://lexvo.org/ontology#label> "Seneschal"@en .
This file has been truncated, but you can view the full file.
package org.apertium.transfer.generated;
import java.io.*;
import org.apertium.transfer.*;
public class apertium_es_ast_es_ast_t1x extends GeneratedTransferBase
{
public boolean isOutputChunked()
{
return false;
}
/** COMIENZA LA SECCIÓN DE DEFINICIÓN DE CATEGORIASCOMIENZA LA SECCIÓN DE DEFINICIÓN DE ATRIBUTOS */
@jimregan
jimregan / buildmodel.pl
Created May 2, 2012 22:55
Playing with Algorithm::SVM
#!/usr/bin/perl
use warnings;
use strict;
use Algorithm::SVM;
use Algorithm::SVM::DataSet;
my $svm = new Algorithm::SVM(Type => 'C-SVC',
Kernel => 'linear',
@jimregan
jimregan / apertium-cleanstream.cc
Created April 2, 2012 12:21
Simple file to clean an Apertium stream.
/*
* Copyright (C) 2005 Universitat d'Alacant / Universidad de Alicante
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
#!/usr/bin/perl
use warnings;
use strict;
sub distance {
my $first = shift;
my $second = shift;
my @weight = qw(8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 16 16 16 16 16 16 16 16 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32);
// http://www.cs.bilkent.edu.tr/~bilmdg/bilvideo-7/Software.html
//g++ -Wno-write-strings -shared -o libmpeg7.dylib -I. -I/opt/local/include/ -L/opt/local/lib/ $(find . -name "*c") $(find . -name "*cpp")
//g++ -Wno-write-strings -I. -I/opt/local/include/ -I /opt/local/include/opencv/ -L/opt/local/lib/ -L. -l mpeg7 -l opencv_core -l opencv_highgui main.cpp -o frd
#include <iostream>
#include "Feature.h"
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
@jimregan
jimregan / ga-ipa.txt
Created March 17, 2012 19:29
beginnings of Irish to IPA
::Lower;
#[:Separator:] } is { [:Separator:] <> ɪsˠ;
::Null;
#Needs to be a separate pass, otherwise the vowels won't exist
[eiéí] { s > ʃ;
::Null;
b } [aouáóú] <> bˠ;
ch } [aouáóú] <> x;
c } [aouáóú] <> kˠ;
f } [aouáóú] <> fˠ;
@jimregan
jimregan / first-sentence.tex
Created March 17, 2012 17:45
Lexicalisation table
\begin{table}
\begin{center}
\caption{Example DBpedia short abstracts from the Wikipedia articles ``.ag''.\label{tab:comp}}
\begin{tabular}{r p{5cm}}
en & . ag is the Internet country code top-level domain for Antigua and Barbuda. \\
eu & . ag Antigua eta Barbudari dagokion herrialdeentzako goi mailako domeinua da.
Antiguako Osasun Zientzietako Unibertsitateak kudeatzen du.\\
& {\em (The first Basque sentence is parallel).}
\end{tabular}
\end{center}