Wow, exactly what I was looking for!
Thanks a lot Christian.
2011/5/26 Christian Grün christian.gruen@gmail.com
Hi Wiard,
the following query might give you the requested result:
ft:count ( db:open('brievenvangogh')//*[text() contains text 'zonnebloemen'] )
Hope this helps, Christian ___________________________
On Thu, May 26, 2011 at 5:10 PM, Wiard Vasen wiard.vasen@gmail.com wrote:
Hi Christian, The result should be: hits: 3. In that case I can use the same query for all kind of terms. Like; how many occurrences are there in the repository of the term " gauguin", or "money". That way I can both find the total number of occurrences as well as the files containing the term. I hope this answers your question. Regards, Wiard
2011/5/26 Christian Grün christian.gruen@gmail.com
Hi Wiard,
thanks for your answer. Just to get sure.. How should the result look like for the documents in question? ;)
Christian
On Thu, May 26, 2011 at 8:00 AM, Wiard Vasen wiard.vasen@gmail.com wrote:
Hi Christian, Thank you for looking at the query. You are always a great help! The result I am looking for is the total number of occurences. Because there is such a large repository of letters. With this number I am able to say that the word 'zonnebloemen' occurs
30
times in all documents. For example. I thought this could be accomplished with a small alteration of this query. If you see a solution that would be great, otherwise I just count them by hand. Regards, Wiard
2011/5/26 Christian Grün christian.gruen@gmail.com
Hi Wiard,
finally a quick answer; the result seems correct to me, as the term "zonnebloemen" occurs in three of the documents that you sent to me. I've attached the result below; which result would you have expected?
Christian
<document uri="file:/G:/XML/brievenvangogh/let001.xml"/> <document uri="file:/G:/XML/brievenvangogh/let002.xml"/> <document uri="file:/G:/XML/brievenvangogh/let003.xml"/> <document uri="file:/G:/XML/brievenvangogh/let004.xml"/> <document uri="file:/G:/XML/brievenvangogh/let266.xml"> <hit score="0.2953945291203477" count="1"> <ab xmlns="http://www.tei-c.org/ns/1.0" rend="indent">Verder maakte ik nog een studie van een<lb n="28" xml:id="l-28"/>hofje met een bleek & zonnebloemen.<anchor n="4" xml:id="note-o-4"/> </ab> </hit> </document> <document uri="file:/G:/XML/brievenvangogh/let653.xml"> <hit score="0.2953945291203477" count="1"> <ab xmlns="http://www.tei-c.org/ns/1.0" rend="indent">Ik heb een studie van een tuin<c type="kk">/</c>haast een meter breed.<lb n="18" xml:id="l-18"/>op den voorgrond klaprozen & andere roode bloemen in groen.<lb n="19" xml:id="l-19"/>dan een vak<hi rend="ital">blaauwe</hi>klokken<c type="kp">_</c>Dan een vak<lb
n="20"
xml:id="l-20"/>oranje en geele afrikanen<c type="kk">/</c>dan witte
en
geele<lb n="21" xml:id="l-21"/>bloemen en eindelijk op den
achtergrond
rose en lilas<lb n="22" xml:id="l-22"/>en nog scabiosas<c type="kk">/</c>donkerviolet<c type="kk">/</c>en roode geraniums en zonnebloemen<lb n="23" xml:id="l-23"/>en een vijgeboom en laurier
rose
en een wingerd<c type="kp">_</c>Aan ’t eind zwarte<lb n="24" xml:id="l-24"/>cypressen tegen lage witte huisjes met oranje dak – en een fijn<lb n="25" xml:id="l-25"/>groenblaauwe strook lucht.<anchor n="1" xml:id="note-o-1"/>
</ab> </hit> </document> <document uri="file:/G:/XML/brievenvangogh/let740.xml"> <hit score="1" count="1"> <hi xmlns="http://www.tei-c.org/ns/1.0" rend="ital">Zonnebloemen</hi> </hit> </document>
On Wed, May 25, 2011 at 11:21 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Wiard,
sorry for the delay; my todo list is long today, but I'll try to
give
you some feedback soon (if not someone else is faster..).
Christian ___________________________
On Wed, May 25, 2011 at 8:56 PM, Wiard Vasen <
wiard.vasen@gmail.com>
wrote: > Hi Christian, > Did I throw to much over the fence? > Regards, > Wiard > > 2011/5/25 Wiard Vasen wiard.vasen@gmail.com >> >> Hi Christian, >> I hereby send you several xml-files containing the term >> 'zonnebloemen'. >> The first four documents(266,653,667,740) are with this term. >> The last four(1,2,3,4) don't have the term. >> Thanks for looking at my problem! >> Regards, >> Wiard >> >> 2011/5/25 Christian Grün christian.gruen@gmail.com >>> >>> Hi Wiard, >>> >>> > I get the number of all documents as the number of hits. >>> > And what I want is the number of documents containing the term >>> > 'zonnebloemen'. >>> > Last time you had a solution for the number of hits in one >>> > specific >>> > document. >>> > I hope you have a solution for this problem. >>> >>> Could you provide us with a little document that allows us to >>> reproduce the problem? >>> >>> Thanks, >>> Christian >> > >