Skip to content

Instantly share code, notes, and snippets.

View SebastiaanLubbers's full-sized avatar
🏠
Working from home

Sebastiaan Lubbers SebastiaanLubbers

🏠
Working from home
View GitHub Profile
@SebastiaanLubbers
SebastiaanLubbers / WorkflowResourceDictionary.cs
Created December 14, 2015 13:07
How to load customized workflow resource dictionary
namespace MyWorkflow
{
public sealed partial class MyDesigner
{
static MyDesigner()
{
var hashTable = new Hashtable();
using (var xmlReader = XmlReader.Create(new StringReader(Resources.DefaultColorResources)))
{
@SebastiaanLubbers
SebastiaanLubbers / DispatchDelegate
Created January 27, 2014 09:29
EventManager.Dispatcher
namespace EventManager
{
public delegate void DispatchDelegate(object sender, object source, object target, object data);
public class Dispatcher
{
public event DispatchDelegate OnDispatch;
public void Dispatch(object source, object target, object data)
{
@SebastiaanLubbers
SebastiaanLubbers / SymSpell
Last active January 17, 2024 11:37
1000x Faster Spelling Correction algorithm
// SymSpell: 1000x faster through Symmetric Delete spelling correction algorithm
//
// The Symmetric Delete spelling correction algorithm reduces the complexity of edit candidate generation and dictionary lookup
// for a given Damerau-Levenshtein distance. It is three orders of magnitude faster and language independent.
// Opposite to other algorithms only deletes are required, no transposes + replaces + inserts.
// Transposes + replaces + inserts of the input term are transformed into deletes of the dictionary term.
// Replaces and inserts are expensive and language dependent: e.g. Chinese has 70,000 Unicode Han characters!
//
// Copyright (C) 2012 Wolf Garbe, FAROO Limited
// Version: 1.6