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

feature/stat-script #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feature/stat-script #5

wants to merge 2 commits into from

Conversation

cheakimsemao
Copy link

@cheakimsemao cheakimsemao commented Aug 9, 2022

added stat script

@cheakimsemao cheakimsemao added the enhancement New feature or request label Aug 9, 2022
@cheakimsemao cheakimsemao requested a review from Socret360 August 9, 2022 03:35
@cheakimsemao cheakimsemao self-assigned this Aug 9, 2022
@cheakimsemao cheakimsemao changed the title added stat script feature/stat-script Aug 9, 2022
Copy link
Collaborator

@Socret360 Socret360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Don't need to have is_directory function. os.path.isdir already returns a boolean.
  2. Update the description in parser.add_argument and AssertError description too.
  3. Don't + "/" use os.path.join instead. + "/" will cause an error on windows.
  4. The code goes through the entire dataset twice. Once for reading the text boxes and onces for counting the characters. You can make adjust to only goes through the dataset once.
  5. The function and variable names that has "word" in them is not accurate. Each textboxes contains a line (not a word). Should rename strip_words and split_words to strip_line and split_line respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants