Closed dzenilee closed 3 years ago
I'm not sure that's the correct flag... I think you want it to be "-truecase.bias" and not "-bias"
Thanks, @AngledLuffa. I think that was it (I can see some changes in the output!). But can you still explain what range of values INIT_UPPER
, UPPER
, and O
can take? Setting specifically INIT_UPPER
to -1 (what I think may be the lower bound) has no effect on the output even after updating the param name to truecase.bias
, i.e., it doesn't lowercase the initial letter of the sentence. It could be that I don't understand how these bias settings work and am expecting something that shouldn't happen, so more extensive documentation would be appreciated!
Hopefully these comments can help explain it:
On https://stanfordnlp.github.io/CoreNLP/truecase.html,
truecase.bias
is described as:It has the default values of
INIT_UPPER:-0.7,UPPER:-0.7,O:0
, and I'd like to change these, but it looks like the only way to do that (usingstanza
) is by modifyingself.client.start_cmd
directly in the constructor. This is what I'm doing:And this correctly logs the command with the adjusted bias:
Assuming the range for these variables is -1 to 1 and an
INIT_UPPER
value of -1 means never capitalize the initial word of a sentence, I expect the first word to come out lowercase at all times. However, this is not what's happening.First, can you confirm -1 to 1 is the correct range? (I've also tried other numbers like -100, 0.2 and 1, and nothing changes).
I did notice that
classBias
(with emphasis on class) is always set to the default values (INIT_UPPER:-0.7,UPPER:-0.7,O:0
) no matter what I pass for thebias
parameter (see logs below). Is it possibleclassBias
is overwriting the value ofbias
? Where is that getting set and what's the difference between the two anyway?