Project

wordtree

0.0
No commit activity in last 3 years
No release in over 3 years
WordTree common library code
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 3.4
~> 2.6
~> 10.3
~> 3.1
~> 2.9
~> 1.18

Runtime

= 0.0.3
~> 1.14
= 1.4.1
= 0.2.5
~> 1.0
 Project Readme

Wordtree

This is the WordTree ruby gem for text analysis.

Installation

$ gem install wordtree

Usage

require 'wordtree'

library = WordTree::Library.new("/tmp/library")
librarian = WordTree::Librarian.new(library)

Download a book from Archive.org to your "library":

book_ids = librarian.archive_org_get(
  'latewarbetween_00hunt',
  'firstbooknapole00gruagoog')

Find a book in your on-disk "library":

book = librarian.find('firstbooknapole00gruagoog')
book.metadata
book.content

Modify and save a book to your "library":

book.year = 2014
librarian.save(book)

Clean the text:

book.clean_content
# returns the book without punctuation

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request