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

Preprocess Text unable to browse files without ".txt" extension #333

Closed
chasets opened this issue Jan 25, 2018 · 4 comments
Closed

Preprocess Text unable to browse files without ".txt" extension #333

chasets opened this issue Jan 25, 2018 · 4 comments

Comments

@chasets
Copy link
Contributor

chasets commented Jan 25, 2018

Text version

0.3.0

Orange version

3.8.0

Additional version information

MacOS 10.12.6
Conda 4.3.29
Python 3.6.0

Expected behavior

In the Preprocess Text widget, the user should be able to choose the folder icon for "Stopwords" or "Lexicon" and browse to a file containing the appropriate text, regardless of the name of the file. This is especially true considering that the included nltk files do not conform to a ".txt" convention.

Actual behavior

The File Chooser only allows selection of files with the ".txt" extension as part of the filename. The files included with orange3-text at nltk_data/corpora/stopwords/* do not include this extension, so they are not available to choose in Preprocess Text.

Steps to reproduce the behavior
  1. Add a Corpus widget and choose book-excerpts.tab
  2. Connect a Preprocess Text widget
  3. Open the Preprocess Text widget and browse to the nltk_data/corpora/stopwords directory
  4. None of the files here are available for selection
  5. In the OS, rename the file named "english" to "english.txt"
  6. Repeat step 3 above
  7. The file "english.txt" is available to choose for stopwords
Additional info (worksheets, data, screenshots, ...)

orange_preprocess_text_screenshot

@kernc
Copy link
Contributor

kernc commented Jan 25, 2018

Thanks for the report. Would you like to try submitting a patch fixing the issue?

@chasets
Copy link
Contributor Author

chasets commented Jan 27, 2018 via email

@kernc
Copy link
Contributor

kernc commented Jan 27, 2018

Any sort of diff patch is fine, but easiest to review and apply would be a pull request here on GitHub. This is the basic workflow:

  1. Create a local fork of the repository (Fork button on the top right).
  2. Apply changes on a topic branch of your repository.
  3. Propose changes as a pull request to this repository.

Here's some commands to go with it. Don't avoid asking if you need help.

@chasets
Copy link
Contributor Author

chasets commented Jan 27, 2018 via email

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

2 participants