Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting chunk size of chunk_corpus function #56

Open
doncat99 opened this issue Sep 13, 2024 · 0 comments
Open

setting chunk size of chunk_corpus function #56

doncat99 opened this issue Sep 13, 2024 · 0 comments

Comments

@doncat99
Copy link

doncat99 commented Sep 13, 2024

def chunk_corpus(corpus: list, chunk_size: int = 64) -> list:
"""
Chunk the corpus into smaller parts. Run the following command to download the required nltk data:
python -c "import nltk; nltk.download('punkt')"

@param corpus: the formatted corpus, see README.md
@param chunk_size: the size of each chunk, i.e., the number of words in each chunk
@return: chunked corpus, a list
"""

the default chunk_size is 64, is that the best practice? I tried with 150, and the entity count is the same as 64, but 10% more relationships were obtained.

@doncat99 doncat99 changed the title chunk setting chunk size of chunk_corpus function Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant