Skip to content

simple in memory positional inverted index in python

I trying to make a simple positional index that but having some problems getting the correct output. Given a list of strings (sentences) I want to use the string position in the sting list as document id and then iterate over the words in the sentence and use the words index in the sentence as its position. T…

Multiprocessing managers and custom classes

I do not know why, but I get this strange error whenever I try to pass to the method of a shared object shared custom class object. Python version: 3.6.3 Code: Error: What’s the problem here? Answer Found temporary solution here. I’ve managed to fix it by adding needed keyword to initializer of Au…

Syllable Count In Python

I need to write a function that will read syllables in a word (for example, HAIRY is 2 syllables). I have my code shown on the bottom and I’m confident it works in most cases, because it works with every other test I’ve done, but not with “HAIRY” where it only reads as 1 syllable. TEST…