HELP REQUEST FOR SC BOT

Discuss technical problems and features here
User avatar
Serpent
Black Belt - 3rd Dan
Posts: 3038
Joined: Sat Jul 18, 2015 10:54 am
Location: Moskova
Languages: heritage
Russian (native); Belarusian, Polish

fluent or close: Finnish+ (certified C1), English; Portuguese, Spanish, German+, Italian+
learning: Croatian+, Ukrainian, Czech; Romanian+, Galician; Danish, Swedish
exploring: Latin, Karelian, Catalan, Dutch, Chaucer's English
+ means exploring the dialects/variants
x 4038
Contact:

Re: HELP REQUEST FOR SC BOT

Postby Serpent » Mon Jul 09, 2018 11:24 am

Ok I just noticed there's a new tag for Slavic. Would it be possible for you to change my items from #sla to #07?
Does the database show anything for Finno-Ugric (#02)?

(also it still says December 2017 on top :D)
0 x
LyricsTraining now has Finnish and Polish :)

User avatar
rdearman
Site Admin
Posts: 3871
Joined: Thu May 14, 2015 4:18 pm
Location: United Kingdom
Languages: English (N)
Language Log: viewtopic.php?f=15&t=1836
x 8539
Contact:

Re: HELP REQUEST FOR SC BOT

Postby rdearman » Mon Jul 09, 2018 12:29 pm

Serpent wrote:Ok I just noticed there's a new tag for Slavic. Would it be possible for you to change my items from #sla to #07?
Does the database show anything for Finno-Ugric (#02)?

(also it still says December 2017 on top :D)

The dates at the top are hardcoded in the HTML and I didn't bother with that since it doesn't imped the functionality. It needs to be changed so it reads that from the DB also. If anyone is interested in updating the code it is here: https://github.com/language-learners/superchallengebot

hum... Can't change them since they don't exist in the DB. So this will take a little explaining. When the SC started in May 2018, the 2017 version was running on the the server and I couldn't log in to stop it. I created the new 2018 database and started off the collector job and it was collecting all the tweets and putting them into the new DB, but the old one was also running and sticking them into the old DB. So the tweets were going into two different databases. But on the webpage you could see 2017 data and 2018 data. The problem is that the tags being displayed on the site were being taken from the old DB, but didn't exist in the new one. The new collector would have been trying to send you a message saying that doesn't exist and you can't report on it, but the old one accepted it.

There seems to have been a modification to the twitter API done by the company sometime last year which stops the collector from sending you messages. Used to be it would reply with something like "Serpent read X pages in Y language" or "You're not signed up for that language", but because of this API change twitter isn't displaying these messages.

Language families has been a painful hack ever since we tried it out last year. Mostly because of conflicting ISO codes and the fact it wasn't originally designed to be able to handle three character designators. I did seriously consider not allowing language families this year, but because of popular appeal I figure it was ok. If we'd not had this snafu with not being able to modify the DB configuration it would have been OK, because you'd have known the tags which the DB supports.

I will look at your problem and see if I can do a data dump from one DB and an upload into the other. Can you tell me how many records we're talking about? Also if anyone else is having problems with language families could you let me know?
0 x
: 4 / 100 100 Italian paperbacks:

User avatar
Serpent
Black Belt - 3rd Dan
Posts: 3038
Joined: Sat Jul 18, 2015 10:54 am
Location: Moskova
Languages: heritage
Russian (native); Belarusian, Polish

fluent or close: Finnish+ (certified C1), English; Portuguese, Spanish, German+, Italian+
learning: Croatian+, Ukrainian, Czech; Romanian+, Galician; Danish, Swedish
exploring: Latin, Karelian, Catalan, Dutch, Chaucer's English
+ means exploring the dialects/variants
x 4038
Contact:

Re: HELP REQUEST FOR SC BOT

Postby Serpent » Mon Jul 09, 2018 2:00 pm

I currently have 19 "films" listed as Slovenian (there are a bit more items because not all are 90min long).
I also had 7 Finno-Ugric items.
0 x
LyricsTraining now has Finnish and Polish :)

User avatar
tiia
Green Belt
Posts: 426
Joined: Tue Mar 15, 2016 11:52 pm
Location: Finland
Languages: German (N), English (?), Finnish (~B2), Spanish (B1), Swedish (A1?)
Language Log: viewtopic.php?t=2374
x 623

Re: HELP REQUEST FOR SC BOT

Postby tiia » Wed Jul 11, 2018 6:09 pm

Somehow my posts from June are now all missing in the list. There should be 3-4 entries for films after the "first minute"-entry. (I didn't log any reading in June, nor have I logged anything for July yet.)
0 x
Corrections for entries written in Finnish, Spanish or Swedish are welcome.
Project 30before30: 22 / 30

User avatar
Serpent
Black Belt - 3rd Dan
Posts: 3038
Joined: Sat Jul 18, 2015 10:54 am
Location: Moskova
Languages: heritage
Russian (native); Belarusian, Polish

fluent or close: Finnish+ (certified C1), English; Portuguese, Spanish, German+, Italian+
learning: Croatian+, Ukrainian, Czech; Romanian+, Galician; Danish, Swedish
exploring: Latin, Karelian, Catalan, Dutch, Chaucer's English
+ means exploring the dialects/variants
x 4038
Contact:

Re: HELP REQUEST FOR SC BOT

Postby Serpent » Sat Jul 14, 2018 7:00 pm

No news about families?
Also, the streaks seem to be broken for me. I've submitted items this week but the streak icon doesn't have a check mark. Perhaps it checks only reading?

tiia wrote:Somehow my posts from June are now all missing in the list. There should be 3-4 entries for films after the "first minute"-entry. (I didn't log any reading in June, nor have I logged anything for July yet.)
was it in the first week of June?
0 x
LyricsTraining now has Finnish and Polish :)

User avatar
zenmonkey
Brown Belt
Posts: 1478
Joined: Sun Jul 26, 2015 7:21 pm
Location: Germany and France
Languages: Spanish, English, French trilingual - actively studying German (B2/C1), Hebrew, Tibetan, Setswana.
Some knowledge of Italian, Portuguese, Ladino, Yiddish ...
Want to tackle Tzotzil, Nahuatl
Language Log: viewtopic.php?f=15&t=859
x 3383
Contact:

Re: HELP REQUEST FOR SC BOT

Postby zenmonkey » Sat Jul 14, 2018 7:28 pm

Ok, looked at the code. (I'm not going to put it in my docker, good god) but here is a quick fix to the issue with #book being confused with #bo for Tibetan:

The fix is adding the term #book to the keyword list. Go to preferences.php and in the line

Code: Select all

public $KEYWORDS = array("#film", "#listen");


change it to:

Code: Select all

public $KEYWORDS = array("#film", "#listen", "#book");


then function keywordExistsAtPosition will return true when called by findHashtagInString and #book won't be considered #bo

edit: one should probably add other keywords like #read, #undo, etc. to that list.
1 x
Tagged posts: Language Method Resource
Please feel free to correct me in any language, critique my posts, challenge my thoughts.
I am inconsistency incarnate.
Go study! Publisher of Syriac, Aramaic, Hebrew alphabet apps at http://alphabetsnow.zyntx.com

User avatar
rdearman
Site Admin
Posts: 3871
Joined: Thu May 14, 2015 4:18 pm
Location: United Kingdom
Languages: English (N)
Language Log: viewtopic.php?f=15&t=1836
x 8539
Contact:

Re: HELP REQUEST FOR SC BOT

Postby rdearman » Sat Jul 14, 2018 7:37 pm

zenmonkey wrote:Ok, looked at the code. (I'm not going to put it in my docker, good god) but here is a quick fix to the issue with #book being confused with #bo for Tibetan:

The fix is adding the term #book to the keyword list. Go to preferences.php and in the line

Code: Select all

public $KEYWORDS = array("#film", "#listen");


change it to:

Code: Select all

public $KEYWORDS = array("#film", "#listen", "#book");


then function keywordExistsAtPosition will return true when called by findHashtagInString and #book won't be considered #bo

edit: one should probably add other keywords like #read, #undo, etc. to that list.


Please clone the code, add these items and I'll be happy to review and then publish the code to the bot. Basically this bot (like the forum) is configured to be updated directly from github.

EDIT:

I'm not sure that is the problem, since later in the code you can see that the tags used are:

Code: Select all

        $this->TAGS = array(
            'book' => array("#book","#read"),
            'film' => array("#film","#movie","#watch","#listen","#audio","#radio"));

So it already has book included. Also it recognises #watch for films. So this is the area where it is picking up the hashtags people use. I'll have to dig through the code and figure out which of these arrays it is using to match.
0 x
: 4 / 100 100 Italian paperbacks:

User avatar
brilliantyears
Green Belt
Posts: 303
Joined: Mon Aug 17, 2015 11:52 am
Location: Netherlands
Languages: Dutch, English
Active: Russian (A1.2), Ainu
Maintaining: Japanese (JLPT N2~N1), German
Dabbled in (and lost): Korean, Mandarin, French, Latin, classical Manchu
Language Log: viewtopic.php?f=15&t=1104
x 405
Contact:

Re: HELP REQUEST FOR SC BOT

Postby brilliantyears » Sat Jul 14, 2018 8:17 pm

Serpent wrote:Also, the streaks seem to be broken for me. I've submitted items this week but the streak icon doesn't have a check mark. Perhaps it checks only reading?

My streak was broken too, but that was because of the missing updates from approx. the first week of June. I had a 10 week streak, now down to a 4 week streak...
0 x
Russian ½ SC Movies: 50 / 50 Books: 2 / 50
Japanese ½ SC Movies: 50 / 50 Books: 7 / 50
Ainu STV Radio course: 8 / 52

User avatar
zenmonkey
Brown Belt
Posts: 1478
Joined: Sun Jul 26, 2015 7:21 pm
Location: Germany and France
Languages: Spanish, English, French trilingual - actively studying German (B2/C1), Hebrew, Tibetan, Setswana.
Some knowledge of Italian, Portuguese, Ladino, Yiddish ...
Want to tackle Tzotzil, Nahuatl
Language Log: viewtopic.php?f=15&t=859
x 3383
Contact:

Re: HELP REQUEST FOR SC BOT

Postby zenmonkey » Sat Jul 14, 2018 8:23 pm

rdearman wrote:
zenmonkey wrote:Ok, looked at the code. (I'm not going to put it in my docker, good god) but here is a quick fix to the issue with #book being confused with #bo for Tibetan:

The fix is adding the term #book to the keyword list. Go to preferences.php and in the line

Code: Select all

public $KEYWORDS = array("#film", "#listen");


change it to:

Code: Select all

public $KEYWORDS = array("#film", "#listen", "#book");


then function keywordExistsAtPosition will return true when called by findHashtagInString and #book won't be considered #bo

edit: one should probably add other keywords like #read, #undo, etc. to that list.


Please clone the code, add these items and I'll be happy to review and then publish the code to the bot. Basically this bot (like the forum) is configured to be updated directly from github.

EDIT:

I'm not sure that is the problem, since later in the code you can see that the tags used are:

Code: Select all

        $this->TAGS = array(
            'book' => array("#book","#read"),
            'film' => array("#film","#movie","#watch","#listen","#audio","#radio"));

So it already has book included. Also it recognises #watch for films. So this is the area where it is picking up the hashtags people use. I'll have to dig through the code and figure out which of these arrays it is using to match.


Go to the function findHashtagInString -- it calls keywordExistsAtPosition which uses the array I listed. It checks the language before it uses the code you've posted here.

I've done the clone and created the pull request for you. Best of luck.
0 x
Tagged posts: Language Method Resource
Please feel free to correct me in any language, critique my posts, challenge my thoughts.
I am inconsistency incarnate.
Go study! Publisher of Syriac, Aramaic, Hebrew alphabet apps at http://alphabetsnow.zyntx.com

User avatar
Serpent
Black Belt - 3rd Dan
Posts: 3038
Joined: Sat Jul 18, 2015 10:54 am
Location: Moskova
Languages: heritage
Russian (native); Belarusian, Polish

fluent or close: Finnish+ (certified C1), English; Portuguese, Spanish, German+, Italian+
learning: Croatian+, Ukrainian, Czech; Romanian+, Galician; Danish, Swedish
exploring: Latin, Karelian, Catalan, Dutch, Chaucer's English
+ means exploring the dialects/variants
x 4038
Contact:

Re: HELP REQUEST FOR SC BOT

Postby Serpent » Sat Jul 14, 2018 8:31 pm

brilliantyears wrote:
Serpent wrote:Also, the streaks seem to be broken for me. I've submitted items this week but the streak icon doesn't have a check mark. Perhaps it checks only reading?

My streak was broken too, but that was because of the missing updates from approx. the first week of June. I had a 10 week streak, now down to a 4 week streak...
Yeah mine was interrupted too. Now it says I have a four-week streak too but no check mark (here's a profile with a check mark https://super-challenge.language-learne ... e=Anonamul). even though i did tweet items this week and they got successfully registered. let's see whether my streak disappears at midnight UK time.... (or which timezone is the bot in?)
0 x
LyricsTraining now has Finnish and Polish :)


Return to “Technical Support and Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest