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

$_SESSION['stopwordlist'] is being set even with no stopwords #4

Open
richardneal opened this issue Feb 16, 2013 · 1 comment
Open
Assignees

Comments

@richardneal
Copy link
Owner

I had to disable the following line because, for some reason, the stopword variable is being set even without stopwords:

if (isset($_SESSION['stopwordlist']) && $_SESSION['stopwordorderbox'] == "off" && !in_array($word, $_SESSION['stopwordlist'])) {

Also, it's printing out that there are no stopwords on each line of the chunk display.

@ghost ghost assigned scottkleinman Feb 16, 2013
@scottkleinman
Copy link
Collaborator

I'm trying to visualise what's wrong here. The obvious is that I should not be checking whether the word is in the session stopword list variable, which is a string, but the $stopwords array created from it in the previous line. Whoops! I hope it's that simple, but maybe not. If there are no stopwords, the session variable should be "", and $stopwords will be an empty array or an array with one empty element. If necessary, we can throw the creation of this variable inside a conditional. However, at present $_SESSION['stopwordlist'], like the lemma and other lists, is created automatically in upload.php and is just an empty string if nothing is uploaded.

The printout message is a left over from Scrubber's remove_stopWords() (and functions for lemmatisation, etc.). I think it is being triggered by the fact that I am calling the function directly, rather than going through scrub_text(). I've commented out the message since that's the easiest solution, but do we even need these checks/error messages in the Hypercutter workflow?

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