Shrinath M Aithal

Ranch Hand
+ Follow
since May 20, 2009
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shrinath M Aithal

After a lot of googling and hair pulling, I got it working.

This solved my problem about wild card highlighting;#116172

Specifically, setting up the queryScorer with this :
That did the job.

when we search phrase in text . the result is :

How do I make the highlighter work with multiple words ?
I am using phraseQuery for searching, which searches just fine. But highlighting fails

Any advice/suggestion/example ?
Okkk.... So, Android uses dalvik virtual machine, instead of jvm and that is the reason for all those things.. May be that 1% matters a lot on mobile devices with so less resources to spend..
So you say its best to follow what that document has to say about performance on android devices or any device with lesser resources...

Thanks Ernest

10 years ago
Ok... Now thats easy to understand.. Thanks for that Sherif

Ernest Friedman-Hill wrote:
But for general Java development, it's terrible advice, as is much of what's in that document. In general, don't use that advice except to squeeze additional performance out of troublesome Android applications.

Why is that bad as of Java development? Isn't it true that creating objects hurt the time and space in Java too ?? Do you say that because its a bad programming practice, it doesn't look good and structured and so on?
10 years ago
consider this from "Android" documentation :

A somewhat more radical idea is to slice up multidimensional arrays into parallel single one-dimension arrays:

An array of ints is a much better than an array of Integers, but this also generalizes to the fact that two parallel arrays of ints are also a lot more efficient than an array of (int,int) objects. The same goes for any combination of primitive types.
If you need to implement a container that stores tuples of (Foo,Bar) objects, try to remember that two parallel Foo[] and Bar[] arrays are generally much better than a single array of custom (Foo,Bar) objects. (The exception to this, of course, is when you're designing an API for other code to access; in those cases, it's usually better to trade correct API design for a small hit in speed. But in your own internal code, you should try and be as efficient as possible.)

I got this from here : Android docs

Could you please help me understanding that 2 single arrays is better than one 2d array ??
10 years ago

ravindra patil wrote:You need to declare good bad in double or float , as you have fefined it as integer its losing its precision values
check it out

Thank you Mr. Ravindra
I was over this from yesterday night, and now after a minute since posting it, I realized my mistake
How silly it looks
10 years ago
never mind
got it..
it tends to save the intermediate result in "int"

i.e I changed the line :

Now I feel so silly, someone tell me how do i delete this message
10 years ago

removed parts I've felt unnecessary.. If anyone wants, I can post it..

My problem is :

If I keep on increasing/ changing the value of good and total, like say 1/1, 2/2... it goes properly..
If bad value changes, like
good = 4, bad=1, total=5,
then the result of (good/total) should be 0.8
It is showing zero!!

what am I missing here ??
10 years ago
found a good api based and command line based Parts of Speech tagger, "stanford pos tagger", thought would just let anyone know if they are looking for one.. Thank you guys
10 years ago
ok.. So what you say is I use the already existing datasets, what do you feel about Wordnet? would it be easier ?
By the way, thanks for that ACM, I wasn't aware of that.. Now there are loads of things what I wanted
10 years ago
ok, thank you guys..
But may I know how do you read from a online page on the web and extract only the information you want?? Like lookup a word in online thesauraus and say if it is verb or noun or what part of speech it is?
Because I googled a bit, and couldn't find many java source codes that could do what I wanted.. Any help would be enlightning and appreciated..
10 years ago
hi all,

here is what i am trying to do :
Trying to achieve Natural Language Processing in java.
To do that, the first step is to be able to classify words into their respective parts of speech. To do that, I need to refer to a dictionary or build a database myself. Building a database myself to classify noun or verb seems stupid, so I was thinking if I could make the program to go online when it finds the words not in its database and add that word to the local database using some online dictionary?

If anyone feels uncomfortable to read the question, please post your doubts,
if anyone feels there is a better way of doing this, help me with your ideas,
if anyone knows how to do it, please do guide me..
thanks to all
10 years ago
Currently, the default age of the cookie is -1 which means it dies when browser is closed.
But long ago, may be 3 years back, someone had told me cookie's default age was 100 milliseconds or something similar, but not negative..

I just wanted ask the long term users here, was there a different default age for the cookie anytime before since the birth of servlets?
Can I find a document or anything from sun about it anywhere on net? I tried to google it, but wasn't fruitful..
Please help..
10 years ago

Lukas Smith wrote:

Cameron Wallace McKenzie wrote:
I had this vision of all certified Java professionals wearing it once a year at Java One, sorta like war heroes wearing their medals on remembrance day, and then putting them away until the next conference.
-Cameron McKenzie

So what about those people with:

Should they attach them all?
They would look like the generals

geek generals

that piece of cloth on which they wear so many things wouldn't be reusable

but man, wouldn't it be a "funky dress day" ?

Cameron Wallace McKenzie wrote:The badge was highly overrated.

I looked at that link. What specifically explained the demise of the badge?

-Cameron McKenzie

I agree it was overrated, but I was annoyed when I felt that something which should come to me didn't come

and for the "demise" of badge, in that link scroll to "certificate enquires" and you'll find this :

What will the successful candidate receive in their certification kit?
All certification kits include the following*:
A Sun certified certificate with the candidate's name and certification title.
An ID card with the candidate's name and certification title.

* Due to damage that lapel pins were causing to certificates in shipping, Sun has discontinued Certification lapel pins as part of the certification kit .