fsner icon indicating copy to clipboard operation
fsner copied to clipboard

Multiple distinct sentences as a query.

Open dnanad opened this issue 3 years ago • 1 comments

Hi!

I saw some of the other issues. Also, tried the following what you recommended:

`W_supports = tokenizer.tokenize(supports).to(device) n = len(supports)

for q in query: W_query = tokenizer.tokenize([q]*n).to(device) start_prob, end_prob = model(W_query, W_supports) print(W_query) output = tokenizer.extract_entity_from_scores(query, W_query, start_prob, end_prob, thresh=0.50) print(output)`

But at the second iteration only i am getting KeyError: 'sizes'.

I tried separately for the query, by first creating [q]*n then doing the rest. It works fine, but not in this for loop.

dnanad avatar Mar 01 '22 11:03 dnanad

@dnanad Hi could you please try with the latest version (fsner==0.1.1) the issue should be resolved with latest fixes. Also don't forget that each example sentence should not contain more than one pair of [E]...[/E]. Also there is a data preparation section on the readme. I hope this would help.

sayef avatar Mar 29 '22 21:03 sayef