Skip to content

Instantly share code, notes, and snippets.

Avatar

Gregor Mohorko GregaMohorko

View GitHub Profile
@GregaMohorko
GregaMohorko / LanguageDetection.cs
Last active Apr 13, 2017
N-Gram-Based text categorization algorithm that can be used for language detection.
View LanguageDetection.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GM.NLP.TextCategorization
{
public struct Profile
{
public string Name;
@GregaMohorko
GregaMohorko / AudioEffect.cs
Last active Apr 13, 2017
Audio impulse response in time domain.
View AudioEffect.cs
using System;
using System.Threading;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
namespace GM.SP.Audio
{
public static class AudioEffect
{
/// <summary>
@GregaMohorko
GregaMohorko / SignalAnalysis.cs
Last active Apr 13, 2017
Audio signal analysis to get information about frequencies.
View SignalAnalysis.cs
using System;
using NAudio.Dsp;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
namespace GM.SP.Audio
{
public static class SignalAnalysis
{
public class Frequency
@GregaMohorko
GregaMohorko / AudioGenerate.cs
Last active Apr 15, 2017
Generation of mono frequency audio file/signal.
View AudioGenerate.cs
using System;
using NAudio.Wave;
namespace GM.SP.Audio
{
public static class AudioGenerate
{
/// <summary>
/// Generates a mono frequency audio file.
/// </summary>
@GregaMohorko
GregaMohorko / DTMFDecoder.cs
Last active Apr 15, 2017
Realtime dual-tone multi-frequency signaling (DTMF) decoder.
View DTMFDecoder.cs
using System;
using System.Collections.Generic;
using System.Linq;
using NAudio.Wave;
using Frequency = GM.SP.Audio.SignalAnalysis.Frequency;
namespace GM.SP.Audio
{
/// <summary>
/// https://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling
@GregaMohorko
GregaMohorko / TelephoneKeypadDecoder.cs
Last active Apr 17, 2017
Realtime telephone keypad decoder.
View TelephoneKeypadDecoder.cs
using System;
using System.Threading.Tasks;
namespace GM.SP
{
/// <summary>
/// https://en.wikipedia.org/wiki/Telephone_keypad
/// </summary>
public class TelephoneKeypadDecoder : IDisposable
{
@GregaMohorko
GregaMohorko / Equalizer.cs
Last active Apr 25, 2017
Audio Equalizer as WaveStream and with real-time band-changing.
View Equalizer.cs
using System;
using System.ComponentModel;
using System.Linq;
using GalaSoft.MvvmLight;
using NAudio.Dsp;
using NAudio.Wave;
namespace GM.SP.Audio
{
public class EqualizerBand : ObservableObject
@GregaMohorko
GregaMohorko / KneserNey.cs
Created May 8, 2017
Implementation of Kneser-Ney language model used for smoothing.
View KneserNey.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GM.NLP.Smoothing
{
/// <summary>
/// Implementation of Kneser-Ney language model.
///
@GregaMohorko
GregaMohorko / DoublyLinkedList.cpp
Created Jul 30, 2017
An implementation of Doubly Linked List data structure.
View DoublyLinkedList.cpp
#include <sstream>
#include <cstdlib>
#include <iostream>
using namespace std;
// Represents an element of the doubly linked list.
struct element
{
// The key of the element.
@GregaMohorko
GregaMohorko / StackAndQueue.cpp
Last active Jul 30, 2017
A static implementation of Stack & Circular Queue data structures.
View StackAndQueue.cpp
// Stack is LIFO (Last In First Out)
// Circular Queue is FIFO (First In First Out)
#include <iostream>
#include <sstream>
using namespace std;
#define LENGTH_MAX 10