Skip to content

Correct false positives in language determination.#45

Open
shibacow wants to merge 1 commit intoy-ken:masterfrom
shibacow:feature/user_lang_is_null
Open

Correct false positives in language determination.#45
shibacow wants to merge 1 commit intoy-ken:masterfrom
shibacow:feature/user_lang_is_null

Conversation

@shibacow
Copy link

HI
twitter.user.lang has become null due to a sudden specification change of twitter streaming api.

https://developer.twitter.com/en/docs/tweets/sample-realtime/api-reference

so,now.input parameter is not work.

 lang                ja,en                    # Optional

in_twitter.rb return allways true,even a language different from the specified language.

 return false if (!@lang.nil? && @lang != '') && !@lang.include?(tweet.user.lang)

so.therefore, I changed to use twitter.lang instead of twitter.user.lang to determine the language.

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

Successfully merging this pull request may close these issues.

1 participant