"noNegators" option is not working in SentiStrength - sentiment-analysis

I'm trying out SentiStrength commandline options. "noNegators"(don't use negating words (e.g., not) to flip sentiment) doesn't seem to work fine.
Below is the command given in commandline:
java -jar SentiStrength.jar sentidata C:\conf\PosNeg\ text happy+and+not+satisfied noNegators explain
Output:
3 -2 happy[3]and not satisfied[3][*-0.5 approx. negated multiplier][sentence: 3,
-2] [result: max + and - of any sentence]
Expected: It shouldn't have considered "not"
Please suggest.

Related

Multiple plots from a single text file (gnuplot)

Currently, I have a text file and I'm interested in plotting two different curves from a single file(values for x axis are the same-column 1, values for y axis-columns 3 and 4). The plot should be in STDOUT since I'm working from ssh. The file that I am working with looks like this (filename: tmp)
%Iter duration train_objective valid_objective difference
0 6.0 0.0195735 0.0610958 0.0415223
1 5.0 0.180216 0.191344 0.011128
2 5.0 0.223318 0.241081 0.017763
3 6.0 0.245895 0.262197 0.016302
4 6.0 0.25796 0.28056 0.0226
5 6.0 0.269223 0.291769 0.022546
6 5.0 0.281187 0.298474 0.017287
7 5.0 0.283891 0.305579 0.021688
8 5.0 0.296456 0.307381 0.010925
9 5.0 0.296856 0.315487 0.018631
10 5.0 0.295805 0.321391 0.025586
Total training time is 0:06:27
So far, I can only plot the values corresponding to the 3rd column using the following line:
cat tmp | gnuplot -e "set terminal dumb size 120, 30; set autoscale; plot '-' u 1:3 with lines notitle"
Could someone tell me then how I could include the 4th column in the same plot? is that possible?
Thanks!
There is nothing in your description that rules out the trivial answer:
gnuplot -e "plot 'tmp' u 1:3 with lines, '' u 1:4 with lines"
The terminal choice is not relevant (you used 'set term dumb' but it could just as easily be any other output terminal, connection via ssh does not prevent that). If you have additional constraints that require a more complicated solution, please add them to the question.

Faster way of Appending/combining thousands (42000) of netCDF files in NCO

I seem to be having trouble properly combining thousands of netCDF files (42000+) (3gb in size, for this particular folder/variable). The main variable that i want to combine has a structure of (6, 127, 118) i.e (time,lat,lon)
Im appending each file 1 by 1 since the number of files is too long.
I have tried:
for i in input_source/**/**/*.nc; do ncrcat -A -h append_output.nc $i append_output.nc ; done
but this method seems to be really slow (order of kb/s and seems to be getting slower as more files are appended) and is also giving a warning:
ncrcat: WARNING Intra-file non-monotonicity. Record coordinate "forecast_period" does not monotonically increase between (input file file1.nc record indices: 17, 18) (output file file1.nc record indices 17, 18) record coordinate values 6.000000, 1.000000
that basically just increases the variable "forecast_period" 1-6 n-times. n = 42000files. i.e. [1,2,3,4,5,6,1,2,3,4,5,6......n]
And despite this warning i can still open the file and ncrcat does what its supposed to, it is just slow, at-least for this particular method
I have also tried adding in the option:
--no_tmp_fl
but this gives an eror:
ERROR: nco__open() unable to open file "append_output.nc"
full error attached below
If it helps, im using wsl and ubuntu in windows 10.
Im new to bash and any comments would be much appreciated.
Either of these commands should work:
ncrcat --no_tmp_fl -h *.nc
or
ls input_source/**/**/*.nc | ncrcat --no_tmp_fl -h append_output.nc
Your original command is slow because you open and close the output files N times. These commands open it once, fill-it up, then close it.
I would use CDO for this task. Given the huge number of files it is recommended to first sort them on time (assuming you want to merge them along the time axis). After that, you can use
cdo cat *.nc outfile

Comparing unknown number of variable in bash

I have 1 to 4 linux server names in a configuration file, I will have to take those names out of the configuration file and assign them values (Floating point Value derived from linux commands). Now the number of server taken out of the configuration file may vary depending on the server availability(For example if a server is down for some reason we will remove the server from configuration file or comment it out) so Fixed number of server is 4 but it may reduce based on its availability, how do I compare the values derived and find out the least/minimum out of this ? It will be great if someone could provide suggestions on this.
To compare two floating point numbers you can use bc. It will print (not return) 0 for false and 1 for true statements:
$ bc <<< '2.01 > 2.1'
0
$ bc <<< '2.1 > 2.01'
1
$ bc <<< '2.01 >= 2.1'
0
$ bc <<< '2.01 >= 2.01'
1

What is wrong with neo4j-shell traversal with command (trav -c)

I am trying to traversal over graph nodes, and execute some command for each node. Like this:
neo4j-sh (0)$ trav -d 2 -c "ls $i"
But I always get the error:
Thread[...] already has a transaction bound
What is wrong? Is it a Neo4j bug?
it's a bug and a sign that one one used this command for at least 2 years :)
you can run the equivalent cypher:
WITH {self} as n
MATCH (n)-[*2]-(m)
RETURN m;

MS-DOS debug -l 0 not working

I want to write a bin file to a flash drive. I'm supposed to run:
n helloworld.bin
l 0
w 0 0 0 1
But when I run l 0 I get a File not found error. What am I doing wrong?
Two issues:
MS-DOS filenames should have a maximum of 8 letters before the dot and a maximum of 3 letters after the dot.
For this use of the l command in debug, provide no parameters. The file will always be loaded to CS:0100.
(I somehow find it worrying that my brain saved this useless information for all those years...)

Resources