Coder Social home page Coder Social logo

paceconverterbot's People

Contributors

firozzer avatar kotaroyama avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

kotaroyama

paceconverterbot's Issues

checkNike1stVariation in variousRegexChecks not detecting the unit correctly

On C25K subreddit, I noticed the bot was detecting the unit (mile or km) incorrectly.

https://www.reddit.com/r/C25K/comments/126kqlw/restarting_c25k_but_outside_this_time_w7d3_done/

This user has multiple posts containing pictures of her workout summaries, and the bot seems to be incorrectly detecting the unit in every single one of them.

https://www.reddit.com/user/yuyithemermaid/

It appears that this user is located in the United Kingdom, and the calories burned during a workout is listed using "Kilocalories" instead of "Calories" in the US.

In variousRegexChecks, I noticed that the function checkNike1stVariation is possibly causing the problem in line 173. Specifically, when determining the unit used in the post, it looks whether the string "kilo" is included anywhere in the text. When it's assessing the word "kilocalories", "kilo" is included in it. Therefore, the function incorrctly determines that km is used in the post, when it it uses mile because the user is located in United Kingdom.

A possible solution is to add a space after the word: use "kilo " instead to exclude words like "kilocalories".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.