allenai / allenai/bi-att-flow

process_tokens() in utils.py

Open
#30 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.5k
Forks
667
PR merge metrics
No merged PRs in 30d

Description

Hi,
I have a question about process_tokens(temp_tokens) in utils.py.

After invoke the function of process_tokens(),
the punctuation in [-−—–/~"\\'“’”‘°] will split temp_tokens again.

This may result in some items of "xi = [process_tokens(tokens) for tokens in xi] " whose length are 0.
In other words, some items in the xi may be ""(empty string).
I think this is not necessary.

From my experiment, if i remove process_tokens(), the performance will decrease.
If i reserve process_tokens() and remove the empty string in xi, the performance seems to almost the same.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.