Sort by

recency

|

5 Discussions

|

  • + 0 comments

    Enter your code here. Read input from STDIN. Print output to STDOUT

    import sys

    Predefined word lists

    computer_mouse_words = { "computer", "device", "keyboard", "input", "usb", "wireless", "click", "scroll", "right-click", "left-click", "sensor", "dpi", "bluetooth" }

    animal_mouse_words = { "tail", "fur", "whiskers", "rodent", "nest", "trap", "cheese", "mammal", "predator", "wild", "burrow", "nocturnal", "prey" }

    def classify_mouse(sentence): words = set(sentence.lower().split()) # Tokenize and convert to set comp_score = sum(word in computer_mouse_words for word in words) animal_score = sum(word in animal_mouse_words for word in words)

    return "computer-mouse" if comp_score > animal_score else "animal"
    

    Read input

    n = int(sys.stdin.readline().strip()) # Number of sentences for _ in range(n): sentence = sys.stdin.readline().strip() print(classify_mouse(sentence))

  • + 0 comments

    USTED tiene toda la razón, hay muchas oficinas y póquer en línea u otros juegos de apuestas, así como formas de poner software en su sitio web para abrir un nuevo mira aquí , pero sigue siendo genial ya que permite que toda la industria se desarrolle y le brinda al usuario ¡una opción para los juegos en los juegos más atractivos!

  • [deleted]
    + 0 comments

    Hi,

    I went to the following naïve design: Build a two sets of tokens from wikipedia from both computer-mouse and animal mouse pages Remove from intersection tokens from both sets

    Then, tokenise input query and count tokens belonging to the animal mouse or computer mouse set Then return the concept having the highest count

    M

  • + 0 comments

    Newbie asking for help. how would you do that.

  • + 0 comments

    Where did you guys get the training data?

No more comments