Page 25 of 31

Re: The Super Challenge - discussion thread 2018/2019

Posted: Sun Jul 22, 2018 3:00 pm
by zenmonkey
rdearman wrote:
kulaputra wrote:
Serpent wrote::o I always write min or mins, never minutes... :?


"min" used to work. Now it doesn't, it seems. I'm not sure why. Also haven't tested "mins."

I can tell you that min isn't one of the tags in the code which it is looking for. Although it does some regular expression matching, I wouldn't depend on using shortened tags.


I looked in the code and this is what I found.

Code: Select all

// find a time in a string with hours and minutes, return with minutes
function findMinutesInString($string)
{
    $minutes = findNumberInString($string, array("minutes", "minute", "mins", "min"));
    $minutes += findNumberInString($string, array("hours", "hour", "hrs", "hr")) * 60;
    return $minutes;
}


But the indNumberInString function it does

Code: Select all

    $string = str_replace($keywords, ' xxxxx ', $string);
    $string = preg_replace('/[^a-zA-Z0-9\s]/', ' ', $string);    // make alphanumeric
    $string = preg_replace('/\s\s+/', ' ', $string);            // strip whitespace
    $words = explode(' ', $string);



let's walk that...

first line replaces all those key words by ' xxxxx ' (note the space before and after. That means that '15mins' would get converted correctly to 15 xxxxx)
second line replaces all characters that are not alphanumerical or space by a space
third line reduces all spaces to single space
fourth line creates an array of words from the string

It then goes on to search for the keyword and returns the number prior to the keyword or 0.

I've no idea why it is failing on 'min', some of the time.
I am going to guess it has nothing to do with this bit of code.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Sun Jul 22, 2018 5:16 pm
by CarlyD
I'm finally transferring from my notebook to the bot, and it accepted '27 min' instead of minutes just fine.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Tue Jul 24, 2018 5:21 pm
by demri
demri wrote:
rdearman wrote:
demri wrote:
zenmonkey wrote:Post a copy of your tweets - could be various things.


@langchallenge #read 2 pages of “AT”
@langchallenge just watched a #movie, “Verbotene liebe”
@langchallenge just #watched a #movie, Verbotene liebe1-4
@langchallenge just watched a #movie

I was only registered for German, so I omitted the language tag. I tried it with the tag just in case, but the bot hasn't recognised it either:

@langchallenge #read 2 pages of “AT” #de

Use

@langchallenge just #watched “Verbotene liebe” in #de

That should work.

Unfortunately, still at zero

I've signed with a new twitter account and the bot is now recognising my tweets

Re: The Super Challenge - discussion thread 2018/2019

Posted: Wed Aug 01, 2018 8:57 pm
by Mista
How do I communicate to the bot that I'm doing Sami? I have, of course, tried to #register for #sami, but that came through as Sanskrit... I then tried #se (from the ISO list in the 6WC thread), but that hasn't resulted in anyting whatsoever.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Wed Aug 01, 2018 10:08 pm
by rdearman
Mista wrote:How do I communicate to the bot that I'm doing Sami? I have, of course, tried to #register for #sami, but that came through as Sanskrit... I then tried #se (from the ISO list in the 6WC thread), but that hasn't resulted in anyting whatsoever.

There is no code in the SC bot for sami. You will either have to wait until I can edit the database backend, or use the language family. You can get a list of all codes in the DB by doing show more on the languages at the bottom of the superchallenge website.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Thu Aug 02, 2018 7:42 am
by Mista
rdearman wrote:
Mista wrote:How do I communicate to the bot that I'm doing Sami? I have, of course, tried to #register for #sami, but that came through as Sanskrit... I then tried #se (from the ISO list in the 6WC thread), but that hasn't resulted in anyting whatsoever.

There is no code in the SC bot for sami. You will either have to wait until I can edit the database backend, or use the language family. You can get a list of all codes in the DB by doing show more on the languages at the bottom of the superchallenge website.


Thanks. It would be great if you could do that at some point, as I'm not planning to leave the language anytime soon. I don't have any real ambitions of completing the challenge this time around, though, so I don't mind being patient

Re: The Super Challenge - discussion thread 2018/2019

Posted: Tue Aug 07, 2018 11:30 am
by I_likes_languages
I just realized that Youtube is not excluded from the SC, only videos and podcasts <10min.

Am I allowed to retroactively log all the Youtube videos and podcasts* I've watched/listened to since May 1st and the books I read during May, June and July (those already mentioned in my log with title and page count)?

*Google has recorded everything I've watched and how much of each video I watched with time stamp in my google account. My podcast app doesn't have the same option, but if I only count everything >10min that was published after May 1st & that I listened to it should be accurate enough

Re: The Super Challenge - discussion thread 2018/2019

Posted: Wed Aug 08, 2018 10:18 pm
by Serpent
Yes, that's fine! You can also count anything that you're reasonably sure you've seen/listened in May or later, even if there's nothing that can prove it.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Thu Aug 09, 2018 11:26 am
by rdearman
Mista wrote:
rdearman wrote:
Mista wrote:How do I communicate to the bot that I'm doing Sami? I have, of course, tried to #register for #sami, but that came through as Sanskrit... I then tried #se (from the ISO list in the 6WC thread), but that hasn't resulted in anyting whatsoever.

There is no code in the SC bot for sami. You will either have to wait until I can edit the database backend, or use the language family. You can get a list of all codes in the DB by doing show more on the languages at the bottom of the superchallenge website.


Thanks. It would be great if you could do that at some point, as I'm not planning to leave the language anytime soon. I don't have any real ambitions of completing the challenge this time around, though, so I don't mind being patient

I have included Sami.

mysql> select * from Language where Code = 'se';
+------+------+
| Code | Name |
+------+------+
| se | Sami |
+------+------+
1 row in set (0.16 sec)

So #se or #sami should work now.

Re: The Super Challenge - discussion thread 2018/2019

Posted: Thu Aug 09, 2018 2:34 pm
by Mista
rdearman wrote:I have included Sami.


Thank you! :D