Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ditch use of pickle #1

Open
ben174 opened this issue Jun 25, 2013 · 4 comments
Open

Ditch use of pickle #1

ben174 opened this issue Jun 25, 2013 · 4 comments

Comments

@ben174
Copy link
Owner

ben174 commented Jun 25, 2013

A couple people on reddit mentioned Pickle has some inadequacies and probably isn't necessary for this project.

http://www.reddit.com/r/Python/comments/1gzb50/rikeripsum_a_lorem_ipsum_type_text_generator_but/capdbrx

I could probably just use a flat text file for data.

@rowedonalde
Copy link

How about a sqlite store? That way, you can still index by sentence length quickly.

@ben174
Copy link
Owner Author

ben174 commented Jun 25, 2013

Yea. But I'm wondering if sqlite performs less than pickle. Maybe flat text is better for something so simple.

@danielquinn
Copy link

If you go with a sqlite store, you could extend this to include all of the main characters and fetch conversational fragments between them, or grab lines from just one or two characters:

tngipsum.generate_paragraph(sentences=6)
tngipsum.generate_sentence(characters=(PICARD, RIKER, CRUSHER), words=8)

@DanAlbert
Copy link

You could also use the json module. It has a nearly identical API to pickle, and is plenty portable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants