String Matching a list of names

I’m working on my first big project trying to learn more about string matching. I am trying to match a list of names based on this article: https://bergvca.github.io/2017/10/14/super-fast-string-matching.html import pandas as pd import re from sklearn.feature_extraction.text import TfidfVectorizer names_short = pd.DataFrame([“gogle”,”bing”,”amazn”,”facebook”,”fcbook”,”abbasasdfzz”, “zsdfzl”,”gogle”,”bing”,”amazn”,”facebook”,”fcbook”, “abbasasdfzz”,”zsdfzl”,”google”,”bing”,”amazon”,”facebook”], columns=[“name”]) def ngrams(string, n=3): string = re.sub(r'[,-./]|\sBD’,r”, string) ngrams = zip(*[string[i:] for…

Details

Not able to open terminal in MacOS while running .sh files with child_process

The following snippet of code opens Git bash and runs the shell commands in Windows. But in MacOS, it doesn’t open the terminal for the same. Shell script is not being run. const exec = require(‘child_process’).exec; var str = “test.sh” const myShellScript = exec(str); myShellScript.stdout.on(‘data’, (data)=>{ console.log(data); }); myShellScript.stderr.on(‘data’, (data)=>{ console.error(data); });

Details