Sudhi

Mumbai, India

wadkar.wordpress.com

Age: 29

Apr
30
comment What is the "superlative" way of expressing "thank you"
I wish I could say that I rather not dig posts from 2011, but well, .. this is internet so thank you?
Apr
26
comment Correct way to cache only some methods of a class with joblib
Now that I think about it, the docs give the generic approach which must allow for the case when invocation of square could yield different results even with same arguments on different instances of the MyClass. The square method as you described would be a @staticmethod because it looks like calling the method with same arguments does not change the result. This can be achieved by annotating with @staticmethod and making sure the definition does not have self as argument, e.g. @staticmethod #newline def square(x):
Apr
26
comment Correct way to cache only some methods of a class with joblib
Were you able to resolve this issue? Or do we simply follow the docs?
Apr
24
comment How do I pass cachedir to python's joblib Memory at runtime?
If you have some other suggestion or alternative to joblib.Memory I would be fine with that too! All I want to do is memoize an expensive NLP processing function call.
Apr
24
asked How do I pass cachedir to python's joblib Memory at runtime?
Apr
23
comment How can I split a text into sentences using the Stanford parser?
actually, it appears that Sentence class has a method Sentence.listToOriginalTextString which takes the List<CoreLabel> sentence variable in your code. It also mentions that the PTBT tokenizer needs to be run with "invertible=true" option.
Apr
21
comment How can use python's argparse with a predefined argument string?
Thanks! This is highly useful. Now I can run from command line as well as from other python scripts!
Apr
20
comment How can I split a text into sentences using the Stanford parser?
Thanks, this is precisely what I was looking for. Wish there was a quick way to get this from Stanford CoreNLP's server or simple class call from command line. I don't want to create entire java project just for one use case. Any idea how to modify this to take a text file as input (and not load it as a string?)
Apr
20
awarded Cleanup
Apr
20
awarded Excavator
Apr
20
revised How can I split a text into sentences using the Stanford parser?
fix typo in variable name `Sentence.listToString` => `sentence.listToString`
Apr
18
comment Merge two text files block by block
Thanks! Much appreciated
Apr
18
comment Merge two text files block by block
If you get some time, I would really appreciate explanation of how it works. Always a pleasure to learn :-)
Apr
18
comment Merge two text files block by block
Thanks! This worked. I updated my question with more information. But I guess you understood the merge aspect of this.
Apr
18
accepted Merge two text files block by block
Apr
18
comment Merge two text files block by block
I updated my question with more information.
Apr
18
revised Merge two text files block by block
added 1086 characters in body
Apr
18
comment Merge two text files block by block
Thanks! However, there are few more lines (unstructured) after the # ::snt line. How do I capture all of those?
Apr
18
comment Merge two text files block by block
err, any pointers on how to store both the block and the id? Can I process a record twice?
Apr
18
comment Merge two text files block by block
Thanks! Very much helpful. However, the asort function messes up the order of files. I want first block from file1 and second block from file 2. But it returns in reverse order. I tried reordering the file but no luck. It looks like the asort function sorts the array as string. So if the block from file2 is stringwise smaller then it will appear first. Any pointers on how to fix this?
1 2 3 4 5