Skip to content

Instantly share code, notes, and snippets.

View jtejido's full-sized avatar
💭
Hello all you happy people...

jtejido

💭
Hello all you happy people...
View GitHub Profile
@jtejido
jtejido / JaroWinklerDistance.php
Created January 2, 2018 02:23
JaroWinklerDistance extension for php-nlp-tools
<?php
namespace App\Utilities;
/**
* https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance
* This class implements the JaroWinkler distance of two strings or sets.
* This accepts strings of arbitrary lengths.The score is normalized such that 0 equates to no similarity and 1 is
* an exact match. Jaro Winkler distance built a logic on top of Jaro distance which added some weight if they have
* the same prefix (which has a maximum length of 4).
*
@jtejido
jtejido / JaroDistance.php
Created January 2, 2018 02:22
JaroDistance extension for php-nlp-tools
<?php
namespace App\Utilities;
/**
* https://en.wikipedia.org/wiki/Jaro%E2%80%93Winkler_distance
* This class implements the Jaro distance of two strings or sets.
* This accepts strings of arbitrary lengths.The score is normalized such that 0 equates to no similarity and 1 is
* an exact match.
*
*/
@jtejido
jtejido / BraunBlanquetSimilarity.php
Created January 2, 2018 02:20
BraunBlanquetSimilarity extension for php-nlp-tools
<?php
namespace App\Utilities;
/**
* https://doi.org/10.5962/bhl.title.7161
*/
class BraunBlanquetSimilarity
{
@jtejido
jtejido / AnderbergSimilarity.php
Last active January 3, 2018 17:17
AnderbergSimilarity extension for php-nlp-tools
<?php
namespace App\Utilities;
/*
* AKA Sokal–Sneath 4 similarity
*/
class AnderbergSimilarity
{
@jtejido
jtejido / FrequencyDistribution.php
Last active January 3, 2018 20:43
Term Weighing using php-nlp-tools
<?php
namespace App\Utilities;
use NlpTools\Analysis\FreqDist;
class FrequencyDistribution extends FreqDist
{
@jtejido
jtejido / OpenWithSublimeText3.bat
Created December 8, 2017 13:21 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@jtejido
jtejido / LICENCE SUBLIME TEXT
Last active April 28, 2018 06:23
Sublime Text 3 Serial key build is 3143
## Sublime Text 3 Serial key build is 3143
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
@jtejido
jtejido / LEMP (Linux, Nginx, MySQL, PHP), Redis, NodeJS, Laravel Setup.md
Last active December 9, 2017 19:55
LEMP (Linux, Nginx, MySQL, PHP), Redis, NodeJS, Laravel Setup

These are the steps that I follow whenever I setup a new dev machine from scratch. This is intended to be for personal use, whenever I stumble upon memory-loss, but I figured I'd share it.

At the time of writing, I've just finished a fresh install of Debian Stretch (9.2.1) on my machine.

This will setup the following on your machine:

Linux/Nginx/MySQL/PHP (LEMP), Composer, Redis, NodeJS, Laravel

Update all pre-installed packages