12h
revised un-normalised string comparison
fixed bugs in code
12h
comment un-normalised string comparison
Fixed that for you. But you really should have specified what error you were finding...
20h
comment Left padding of 0 for the year 1000
Post the code you are using, the input you give it, the output it is generating, and the output you would want it to generate instead. Then we can try to answer the question. As it is, it is unclear what you are asking, and it will be closed.
1d
comment How to parse Json using Java?
If it starts with { and ends with }, that is a JavaScript/JSON Object, not an Array; JavaScript Arrays use [ and ], and do not need : to separate keys and values.
1d
answered How does dropbox server keep connection alive with all its client app?
1d
answered un-normalised string comparison
1d
comment un-normalised string comparison
Then you would probably be better off using "edit distance" instead of "same letter in same position" metrics. Example: "Coloring Specialist" vs "Colouring Specialist" -- edit distance is 1, but only 4 letters share position.
1d
comment un-normalised string comparison
I am not sure what your code is supposed to achieve. If there are any repeats, jobs.put(N[i], q) will overwrite old values with new. Also, since the normalizer method has no output and touches no class attributes, all calculations will be lost at the end of the call. Can you edit your post to show expected input and output for, say, jt = "Accountant"?
1d
awarded Popular Question
2d
revised what is the vector space?
expanded explanations re sparse vectors
2d
comment what is the vector space?
Editing answer to clarify.
Feb
26
comment what is the vector space?
@thang why pedantic? Can you provide supporting links for your "many elements are the same, but not zero" interpretation? From the name alone, plus the context (terms in tweets: >100k words in english, but at most some 30 or so in a single tweet), defaulting to zero would seem obvious. Sparse matrixes are the same: unless explicitly set, all cells are 0.
Feb
23
comment generate html from java beans - at compile time
What kind of HTML do you want to generate? Display-as-table and add/alter single instances, or something more complicated?
Feb
23
answered How can I scale fonts on a high resolution screen?
Feb
23
comment using java to copy files makes an unwanted copy under tomcat installation directory
I highly suspect that the problem is in the surrounding code, and not in this copy function. Are you sure you are calling it only once per file-copy operation? How do you get hold of your File instances?
Feb
23
comment what is the vector space?
You should build buckets once you have weights for all tweets, not before (because a corpus that contains very different tweets should have "wider" buckets than a corpus that contains very similar tweets; and you only know how wide your buckets should be after looking at all the corpus). There are advantages and disadvantages to be found in incremental processing (the code you have): it avoids recalculation of vectors (= faster), but loses some accuracy (=less precise). While it is surely possible to do incremental clustering, I cannot guide you there.
Feb
23
answered what is the vector space?
Feb
23
comment what is the vector space?
You appear to be a new user, so I'll help you fix the question a bit (please complain/edit it if I have lost some of the original meaning). In particular: indented code is much easier to read, and your questions should be easy to find. Also, ideally there should only be 1 question per question
Feb
23
revised what is the vector space?
fixed grammar, indented source-code, hopefully retained meaning of question
Feb
23
comment what is the vector space?
I still do not understand what you need vs what you have. Reading your code is hard, because it is not correctly indented. A sparse vector is optimized for few non-zero values, and behaves as a normal vector otherwise.
1 2 3 4 5