Skip to content

Instantly share code, notes, and snippets.

@jimregan
jimregan / rozdzial1.xml
Last active August 29, 2015 14:07
Pan Tadeusz, tagged with WCRF
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chunkList SYSTEM "ccl.dtd">
<chunkList>
<chunk id="l1" type="p">
<sentence id="s1">
<tok>
<orth>Litwo</orth>
<lex disamb="1"><base>Litwa</base><ctag>subst:sg:voc:f</ctag></lex>
</tok>
<ns/>
@jimregan
jimregan / eg.xml
Created August 17, 2014 21:07
Example
<mwdictionary>
<mwpardefs>
<mwpardef n="adj+adj=adj">
<e>
<p>
<l>
<w><lemma n="1"/><s n="adj"/><s n="f"/><s n="sg"/></w>
<b/>
<w><lemma n="2"/><s n="adj"/><s n="f"/><s n="sg"/></w>
</l>
@jimregan
jimregan / filterneg.cpp
Created September 16, 2013 13:10
Another adaptation, to run on a saved model. Supposed to filter false positives from the detector, the first model (638 positive, 638 negative) run gave 20/34 wrong :( (Plus, the model is 128M, so I'm not in a hurry to include it)
/*
* Copyright (c) 2011. Philipp Wagner <bytefish[at]gmx[dot]de>.
* Released to public domain under terms of the BSD Simplified license.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@jimregan
jimregan / demo_lbph.cpp
Last active December 23, 2015 04:19
Adaptation of the OpenCV LBP face recogniser demo to handle more than one image.
/*
* Copyright (c) 2011. Philipp Wagner <bytefish[at]gmx[dot]de>.
* Released to public domain under terms of the BSD Simplified license.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@jimregan
jimregan / FontCache.sh
Created August 24, 2013 22:18
OS X sucks balls. This is just one of the many, many ways
sudo atsutil databases -remove
atsutil server -shutdown && atsutil server -ping
@jimregan
jimregan / output1.xml
Created August 21, 2013 19:37
Simple crossdics run, crossdics run with pardefs
<?xml version="1.0" encoding="UTF-8"?>
<!--
Dictionary:
Bilingual dictionary: cross-cross
Sections: 1
Entries: 1
Sdefs: 3
Last processed by: apertium-dixtools -noalign cross -debug -monA simple-cross-monA.dix -bilAB simple-cross-dictA.dix -bilBC simple-cross-dictB.dix -monC simple-cross-monC.dix -cross-model simple-crossmodel.xml
Patterns applied:
@jimregan
jimregan / spellrelax.xsl
Created April 3, 2013 10:25
spellrelax.xsl, because I'm not dicking around with merge conflicts
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
<!DOCTYPE xsl:stylesheet [ <!ENTITY accent "&#x301;"> ]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:preserve-space elements="*"/>
<xsl:template name="dropaccent">
<xsl:param name="name"/>
@jimregan
jimregan / input.txt
Created March 19, 2013 20:25
Translation iterator
scalac transiter.scala
scala TranslationIterator input.txt > output.txt
Index: lttoolbox/lt-comp.1
===================================================================
--- lttoolbox/lt-comp.1 (revision 42693)
+++ lttoolbox/lt-comp.1 (working copy)
@@ -10,10 +10,26 @@
.SH SYNOPSIS
.B lt-comp
[
+.B \-a \fR|
+.B \-v \fR|
@jimregan
jimregan / gist:4980312
Created February 18, 2013 20:15
Debian machine-readable copyright file for Apertium
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Apertium
Upstream-Contact: Apertium-Stuff Mailing List <apertium-stuff@lists.sourceforge.net>
Source: http://sourceforge.net/projects/apertium/files/apertium/
Files: *
Copyright: Copyright (C) 2005 Universitat d'Alacant / Universidad de Alicante
License: GPL-2+
Files: apertium/lextor_eval.h,