I would like to get the vectors of a number of documents using lucene 4.6 . I m quite new to Lucene and I cannot find a guide to help me. Can you please help me?
Note: I have already done index and searcher, i just need code how to take vectors of documents!
Thank you in advance
You can use the getTermVector method of the IndexReader class.
indexReader.getTermVector(docID, field);
Related
I'm unsure how to do this. If possible a walkthrough on this would be greatly appreciated! Just started a class that uses R and find somethings to be very complicated.
Thanks!
I have tried to just write simple types of loops but not sure how to tie in all of the functions I need to do.
There is maintype(t) = getfield(parentmodule(t), nameof(t)), but it's rather indirect...
Does anyone know a better way?
original post
The solution is to use Base.typename(t).wrapper given t is the same t you referenced in your question!
original post
I am trying to create a regular expression for a dollar amount that accepts values between 5.00 and 1000.00.
Here is what I have so far:
^([5-9](\d){0,4}([.](\d){1,2})?|1000([.](0){1,2})?)?$
I have already tried the range validator and it isn't working this field.
Any help is much appreciated.
This is what I came up with, which could likely be improved. It seems to work for my limited testing. You may want to tag your question with "regex" to get some expert advice!
^(?:[5-9](?:\.\d{0,2})?|\d{2,3}(?:\.\d{0,2})?|1000(?:\.0{0,2})?)$
I am using the function query() of package seqinr to download myoglobin DNA sequences from Genbank. E.g.:
query("myoglobins","K=myoglobin AND SP=Turdus merula")
Unfortunately, for a lot of the species I'm looking for I don't get any sequence at all (or for this species, only a very short one), even though I find sequences when I search manually on the website. This is because of searching for "myoglobin" in the keywords only, while often there isn't any entry in there. Often the protein type is only specified in the name ("definition" on Genbank) -- but I have no idea how to search for this.
The help page on query() doesn't seem to offer any option for this in the details, a "generic search" without any "K=" doesn't work, and I haven't found anything via googling.
I'd be happy about any links, explanations and help. Thank you! :)
There is a complete manual for the seqinr package which describes the query language more in depth in chapter 5 (available at http://seqinr.r-forge.r-project.org/seqinr_2_0-1.pdf). I was trying to do a similar query and the description for many of the genes/cds is blank so they don't come up when searching using the k= option. One alternative would be to search for the organism alone, then match gene names in the individual annotations and pull out the accession numbers, which you could then use to re-query the database for your sequences.
This would pull out the annotation for the first gene:
choosebank("emblTP")
query("ACexample", "sp=Turdus merula")
getName(ACexample$req[[1]])
annotations <- getAnnot(ACexample$req[[1]])
cat(annotations, sep = "\n")
I think that this would be a pretty time consuming way to tackle the problem but there doesn't seem to be an efficient way of searching the annotations directly. I'd be interested in any solutions you might come up with.
I want to convert Info Path number Field to Word
Ex. I have no. 1000 -> Ten Thousand like that please help me.
Thank you,
As far as i know there's no built-in way to achieve this - you'll have to write custom code.
This link might help you converting numbers to text.
http://www.daniweb.com/software-development/csharp/threads/53072