Giter Site home page Giter Site logo

Comments (4)

fitnr avatar fitnr commented on September 28, 2024

Are the files UTF-8 encoded? Could you post a gist with an example?

from twitter_markov.

BrekiTomasson avatar BrekiTomasson commented on September 28, 2024

https://gist.github.com/BrekiTomasson/e9814f32c42376af4fe4795dc3cf95aa for the gist.

The file is in UTF-8.

from twitter_markov.

BrekiTomasson avatar BrekiTomasson commented on September 28, 2024

Also, for reference, when it's been standing still for a while and not outputting anything, and I kill it via a simple ctrl-C, this is what I get:

Traceback (most recent call last):
  File "/usr/local/bin/twittermarkov", line 9, in <module>
    load_entry_point('twitter-markov==0.4.3', 'console_scripts', 'twittermarkov')()
  File "/usr/local/lib/python2.7/dist-packages/twitter_markov/cli.py", line 70, in main
    func(argdict)
  File "/usr/local/lib/python2.7/dist-packages/twitter_markov/cli.py", line 77, in tweet_func
    tm.tweet()
  File "/usr/local/lib/python2.7/dist-packages/twitter_markov/twitter_markov.py", line 178, in tweet
    text = self.compose(model, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/twitter_markov/twitter_markov.py", line 196, in compose
    sent = model.make_sentence(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/markovify/text.py", line 115, in make_sentence
    words = self.chain.walk(init_state)
  File "/usr/local/lib/python2.7/dist-packages/markovify/chain.py", line 98, in walk
    return list(self.gen(init_state))
  File "/usr/local/lib/python2.7/dist-packages/markovify/chain.py", line 87, in gen
    next_word = self.move(state)
  File "/usr/local/lib/python2.7/dist-packages/markovify/chain.py", line 74, in move
    cumdist = list(accumulate(weights))
  File "/usr/local/lib/python2.7/dist-packages/markovify/chain.py", line 9, in accumulate
    def accumulate(iterable, func=operator.add):
KeyboardInterrupt
ยด``

from twitter_markov.

BrekiTomasson avatar BrekiTomasson commented on September 28, 2024

Actually, never mind. It seems the problem might have been that there were other non-standard characters in there, parentheses and quotationmarks, especially. Once I cleaned them out, it worked better.

from twitter_markov.

Related Issues (14)

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.