Skip to content

Instantly share code, notes, and snippets.

@jimregan
jimregan / irish.sbl
Created March 15, 2012 20:55
Irish stemmer
routines (
R1 R2 RV
initial_morph
mark_regions
noun_sfx
deriv
verb_sfx
)
externals ( stem )
@jimregan
jimregan / irc.html
Created March 16, 2012 22:07
pisg for #dbpedia-spotlight
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>#dbpedia-spotlight @ FreeNode stats by MAINTAINER</title>
<style type="text/css" title="default">
a {
text-decoration: none;
}
a:link {
@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}
@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ˠ;
// 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>
#!/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);
@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
@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',
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 */