IndriUI Index not building - information-retrieval

I am trying to build index using Indri UI. I created parameter files and stopword lists for building the index. When I click build index, the UI keeps building for long time and the index is never built.
UI hangs here,
Here is my input.txt file,
<DOC>
<DOCNO>
#switcheery
</DOCNO>
<TEXT>
Lol?"#elsidi01: "#switcheery: God bless that man that loves to see me happy......"#I"
</TEXT>
<DOCNO>
#Roseefly
</DOCNO>
<TEXT>
42% of Irish People have a Medical Card/Doctor Only Card. ##I have to admit we are a great little country #budget15 #healthcare
</TEXT>
<DOCNO>
#FammySaulkner
</DOCNO>
<TEXT>
#dthompsonRTS11 #Kirkpatrick_29 gosh dev you read my mind #I??crossfit
</TEXT>
<DOCNO>
#codesilence
</DOCNO>
<TEXT>
data mine the heart..for ?? #nsa #i
</TEXT>
<DOCNO>
#ulidovmj
</DOCNO>
<TEXT>
Now That's What I Call Club Hits 2014: http://t.co/kd2xE5GZhq #nowalbum #album #ukcharts #uscharts #trending #i... http://t.co/tGe9wH6M0e
</TEXT>
<DOCNO>
#ulidovmj
</DOCNO>
<TEXT>
Now That's What I Call Club Hits 2014: http://t.co/kd2xE5GZhq #nowalbum #album #ukcharts #uscharts #trending #i... http://t.co/BmMMpLHcVA
</TEXT>
<DOCNO>
#ulidovmj
</DOCNO>
<TEXT>
Now That's What I Call Club Hits 2014: http://t.co/kd2xE5GZhq #nowalbum #album #ukcharts #uscharts #trending #i... http://t.co/GyuzOVA68T
</TEXT>
<DOCNO>
#ulidovmj
</DOCNO>
<TEXT>
Now That's What I Call Club Hits 2014: http://t.co/kd2xE5GZhq #nowalbum #album #ukcharts #uscharts #trending #i... http://t.co/sCw5U1DXMy
</TEXT>
<DOCNO>
#ulidovmj
</DOCNO>
<TEXT>
Now That's What I Call Club Hits 2014: http://t.co/kd2xE5GZhq #nowalbum #album #ukcharts #uscharts #trending #i... http://t.co/JwhqJoSN1T
</TEXT>
<DOCNO>
#SandySchmitz3
</DOCNO>
<TEXT>
Having kids is the biggest leap of faith a person can make. 2 create new lives & hope they spread goodness throughout the world. #I WISH
</TEXT>
<DOCNO>
#my_15minutes
</DOCNO>
<TEXT>
wubba lubba dub dub means I'm in great pain, please help me by winning the #I'dbemortyfied contest on #TheMarySue
</TEXT>
<DOCNO>
#darren1966h
</DOCNO>
<TEXT>
I managed to finish the Cheshire welcomes you! assignment! Try it for yourself! http://t.co/NYCrn7DQTu #GameInsight #iPad #i...
</TEXT>
<DOCNO>
#GomitasYnutella
</DOCNO>
<TEXT>
Set de fotos: dee-lirious: #i regret every day of my life i didn’t love you http://t.co/Z48py9uOOC
</TEXT>
<DOCNO>
#PernelleBdt
</DOCNO>
<TEXT>
"Un seul être vous manque et tout est dépeuplé."
Ma plus belle étoile, mon plus beau souvenir.. 3 ans déjà.. #I #14102011 #memories ??
</TEXT>
<DOCNO>
#news8martha
</DOCNO>
<TEXT>
The 2.7 inches of rain that's fallen in La Crosse would translate to 27 inches of snow!
#I'll top complaining now!
</TEXT>
</DOC>
Here is my stopwords.txt,
<parameters>
<stopper>
<word>happy</word>
<word>wondeful</word>
<word>sad</word>
<word>cute</word>
</stopper>
</parameters>
Am I missing something? Please help me with this and I am new to IR.I have no idea about the parameter file. I created one and I am not sure where it is used.

What I did for stopword list, I simply write each word in each line without any tags. Also what I think is the correct way for TRECTEXT format is having each document in one tag of <DOC></DOC> and then inside this tage put the </DOCNO> and </TEXT> tag. For example:
<DOC>
<DOCNO>
#switcheery
</DOCNO>
<TEXT>
Lol?"#elsidi01: "#switcheery: God bless that man that loves to see me happy......"#I"
</TEXT>
</DOC>
<DOCNO>
#Roseefly
</DOCNO>
<TEXT>
42% of Irish People have a Medical Card/Doctor Only Card. ##I have to admit we are a great little country #budget15 #healthcare
</TEXT>
</DOC>

Related

Replace Text in XML files with placeholder text

I performed text mining on files that I am preparing for publication right now. There are several XML files that contain text within segments (see basic example below). Due to copyright restrictions, I have to make sure that the files that I am going to publish do not contain the whole text while someone who has the texts should be able to 'reconstruct' the files. To make sure that one can still perform basic text mining (= count lengths), the segment length should not change. Therefore I am looking for a way to replace every word except for the first and last one in all segments with dummy / placeholder text.
Basic example:
Input:
<text>
<div>
<seg xml:id="A">Lorem ipsum dolor sit amet</seg>
<seg xml:id="B">sed diam nonumy eirmod tempor invidunt</seg>
</div>
</text>
Output:
<text>
<div>
<seg xml:id="A">Lorem blank blank blank amet</seg>
<seg xml:id="B">sed blank blank blank blank invidunt</seg>
</div>
</text>
There is rapply to recursively replace values in a nested list:
Let be data.xml containing your input.
library(tidyverse)
library(xml2)
read_xml("data.xml") %>%
as_list() %>%
rapply(how = "replace", function(x) {
tokens <-
x %>%
str_split(" ") %>%
simplify()
n_tokens <- length(tokens)
c(
tokens[[1]],
rep("blank", n_tokens - 2),
tokens[[n_tokens]]
) %>%
paste0(collapse = " ")
}) %>%
as_xml_document() %>%
write_xml("data2.xml")
Output file data2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<text>
<div>
<seg id="A">Lorem blank blank blank amet</seg>
<seg id="B">sed blank blank blank blank invidunt</seg>
</div>
</text>

Why my SVG is responsive but occasionally?

I've created a 1000×1000 svg , but when I am running it in Chrome browser , if viewport size is less than 1000 the svg image is cropped automatically, having said that, I am not witnessing this problem in jsFiddle ! I am curious if it has anything to do with viewport dimension?
Take a look at what I'm trying:
<svg viewbox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg">
<path d="M100 100 h800 v800 h-800 v-800" fill="black" stroke="red" stroke-width="8" style=" stroke-dasharray: 4000;
stroke-dashoffset: 4000;
animation: dash 2s linear forwards infinite;" /><style>#keyframes dash {
to {
stroke-dashoffset: 0;
}
}</style>
<text x="120" y="200" fill="skyblue" style="font-size:30;">
1: We do not endorse 'Aarogya Setu App'.
<tspan x="120" y="300">
2: To use this App you have to share
</tspan>
<tspan x="120" y="400">
your Name, Age, Sex, Location, Job and
</tspan>
<tspan x="120" y="500">
other details with govt authorities.
</tspan>
<tspan x="120" y="600">
3: Also these details are transferred to
</tspan>
<tspan x="120" y="700">
nearby devices, via bluetooth using an
</tspan>
<tspan x="120" y="800">
encryption model, use only if you trust
</tspan>
<tspan x="120" y="870">
your govt.
</tspan>
</text>
</svg>
Here is jsFiddle link: https://jsfiddle.net/3fuh7ntj/
To see above svg in your browser, click here: https://covidnmap.000webhostapp.com/graphics.svg

How to put button over row In react-native?

I have text and image in one row. and now I want to put button over the row with exact size of row.
used flexDirection: 'row'
Any help?
You can wrap your text and image inside the TouchableOpacity component
<TouchableOpacity onPress={() => doYourThing()}>
<Text>{yourText}</Text>
<Image source={{}} />
</TouchableOpacity>
If the text and image are already wrapped in a View, you can just replace the View component with the TouchableOpacity component. It takes all the props which View takes.

How do I find out where this CSS-value comes from?

I am trying to use bootstrap tooltip for something it probably wasn't designed for, namely the possibility of showing a quite large text. I have managed to tweek it to my needs, with one exception. The width of the text box shown is way too narrow, unless i set it to a fixed width, but then it looks awfully stupid when displaying my short texts. I did override the standard max-width of 200px, but still it would not display even any wider than 120.797px
I tried to make a short simple example, and to my surprise, it works perfectly in my fiddle. with no width property set, it still grows to 800px, as set in max-width. So I tried to figure out what was different between my simple fiddle, and my larger web page. I used the google chrome dev-tools, to show me all set css properties, as I expected some unknown source to influence the width. Normally all properties set by css, are displayed with an arrow on the left side of each property, telling you exactly where, and through which file and selector statement this property is set. Here is what I found:
So, every other property gives a reference, while width remains a mysterious unknown. Notice that the font color is dark red. If this was calculated from other properties, it normally would be faded. I've tried to research what this might mean, but the official documentation leaves no clues. This page was the closest thing I could find.
How do I find out where this CSS-value comes from?
Here is a link to the fiddle. The tooltip text is a random news source from today, in norwegian. Code below, as per Stackoverflow rules:
HTML:
<span class="nav-text" data-toggle="tooltip" data-placement="right" title="" data-original-title="– Vi har nok satt oss litt i respekt i dag for de andre nasjonene. De vet nå at vi ikke er uredde og ikke er redd for å bare gå fra dem i front, sa Johannes Thingnes Bø om den solide seieren.
For da Emil Hegle Svendsen sendte Johannes Thingnes Bø ut på den siste etappen sammen med franske Antonin Guigonnat og italienske Therry Chenal var det mye som skulle gå galt for at ikke stryningen skulle sikre norsk stafettseier.
Og stryningen gikk knallhardt ut og viste konkurrentene ryggen allerede i den første motbakken.
– Jeg er ganske trygg og selvsikker når jeg går ut på siste etappe, sa ankermannen til NRK etter målgang.
En god generalprøve før OL
Det var et godt fornøyd stafettlag etter seieren. Stafetten i Ruhpolding var den store generalprøven for det som skal være det norske OL-laget i Pyeongchang i februar.
– Det var en god følelse. Jeg tar gjerne samme løpsopplegg neste gang det er stafett, sa Thingnes Bø etter seieren med et klart hint til stafetten i OL.">
Hover for tooltip
</span>
CSS:
div.tooltip{
top:0px !important;
}
div.tooltip>div.tooltip-arrow{
top:15px !important;
}
div.tooltip>div.tooltip-inner{
max-width:800px !important;
white-space: pre-wrap;
text-align: left;
}
And standard init of bootstrap tooltip, javascript:
$('[data-toggle="tooltip"]').tooltip();

Displaying React native listview items in equal chunks

I'm working on a eCommerce React Native project. I have a cart component which contains a Listview of all current items within the Cart. The main issue is the styling. I display each product according to quantiy - product name - price and delete button.
So something like this
As you can see the price text is not aligned equally and varies depending on product name. How can I edit the style so all text and buttons within the list view are equal length?
Each Text field can be assigned a flex value like this:
<Text style={{flex: 0.1}}>{product.quantity}x</Text>
<Text style={{padding: 10, flex:0.5}}>{product.name.toString()}</Text>
<Text style={{flex: 0.2}}>£{(product.quantity * product.price).toFixed(2)}</Text>
<TouchableOpacity style={{flex: 0.2}} onPress={() => { this.removeItem(product) }}>
The total of the 0.* should equal to 1.

Resources