Skip to content

Instantly share code, notes, and snippets.

View TinoDidriksen's full-sized avatar
🐺

Tino Didriksen TinoDidriksen

🐺
View GitHub Profile
@TinoDidriksen
TinoDidriksen / 01-input.txt
Created December 7, 2023 13:32
Example of WITH doing both functions and dep at once
Citronen Fjordimi suliniut nunarsuarmi zinkinik aqerlunik peqarnersaasut ilaanniippoq .
@TinoDidriksen
TinoDidriksen / CMakeLists.txt
Last active August 26, 2023 13:37
CMake find and use libevdev
project(example CXX)
find_package(PkgConfig REQUIRED)
pkg_search_module(LIBEVDEV REQUIRED libevdev)
add_executable(example example.cpp)
target_include_directories(example PRIVATE ${LIBEVDEV_INCLUDE_DIRS})
target_link_libraries(example PRIVATE ${LIBEVDEV_LIBRARIES})
@TinoDidriksen
TinoDidriksen / 01-build.sh
Last active June 23, 2023 05:25
HFST wheel manylinux_2_28_x86_64
# In a quay.io/pypa/manylinux_2_28_x86_64 container:
dnf update
dnf install flex bison readline-devel libicu-devel libtool swig pkgconfig readline-devel zlib-devel autoconf automake gcc-toolset-12-libatomic-devel
cd /home/tino/manylinux_2_28/foma/foma/
cmake .
make clean
time make -j8 2>&1 | tee build.log
make install
#!/usr/bin/env php
<?php
/*
USAGE:
./cg-combsets.php kalcg.dansyn kalcg.dan kalcg.dep kalcg.extra kalcg.pre > sets.cg3
Parses all given grammars and spits out all sets used across all grammars, and marks conflicts for manual inspection.
Used to create a combined deduplicated sets.cg3 that multiple grammars can Include.
@TinoDidriksen
TinoDidriksen / 01-katersat-had-multiple.txt
Last active March 7, 2023 14:43
Katersat Danish adjectives
aftagende
akut
almindelig
belgisk
betydningsfuld
blød
bæredygtig
cirkulær
delelig
deltagende
@TinoDidriksen
TinoDidriksen / resume.json
Last active December 26, 2023 13:45
resume.json
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Tino Didriksen",
"label": "Software Developer and Computational Linguist",
"email": "mail@tinodidriksen.com",
"url": "https://tinodidriksen.com/",
echo -e 'Nuuk\nQaanaaq\nAasiaat' | ~/langtech/kal/tools/shellscripts/kal-tokenise | cg-conv -c -F | grep -F Prop+Abs | lg-multi.pl
@TinoDidriksen
TinoDidriksen / 01-msys.sh
Created October 5, 2021 10:20
MSYS2 CMake + Boost Program Options
$ pacman -S cmake make mingw-w64-x86_64-gcc mingw-w64-x86_64-boost
grep -rl '<?php' * | xargs -r grep -rl '?>' | xargs -rn1 php -r '$f=file_get_contents($argv[1]); if (preg_match("~[?]>[\s\n]*$~", $f)) { $f = trim(preg_replace("~[?]>[\s\n]*$~", "", $f))."\n"; file_put_contents($argv[1], $f); }' --
<word>En</word>
"<en>"
"en" det mask ent kvant
"en" adv
"en" pron ent pers hum
"ene" verb imp
<word>serbisk</word>
"<serbisk>"
"serbisk" adj ub m/f ent pos
"serbisk" adj nøyt ub ent pos