Skip to content

Instantly share code, notes, and snippets.

View nickyreinert's full-sized avatar

nicky nickyreinert

View GitHub Profile
@nickyreinert
nickyreinert / compare.ipynb
Created December 9, 2020 12:41
Script to quickly compare performance of seven different stemmers and lemmatizers focussed on German language
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nickyreinert
nickyreinert / functions.php
Created August 18, 2020 16:40
Set post tags when post is saved based on post title and regular expression
<?php
// functions.php is part of your child theme
function add_tags_to_post_on_save( $post_id ) {
// do not trigger if this is revision only
if ( wp_is_post_revision( $post_id ) ) {return;}
// get the current post title
<?php
/*
available lookup methods:
in_array_strict
in_array_non_strict
foreach_strict
foreach_non_strict
isset
intersect
_array_search_strict