simplelorem 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -4
- data/lib/simplelorem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79130cbb8464cfabc48e4f101899762fff33c571
|
4
|
+
data.tar.gz: 90f006c9a7dc2fcb82024dd80e92a40853edd803
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da5fcb4726e7a079730c8c4836f3edfa4c80182ffbaef045e59ac385ca2bae97bb89d008b7e7416bd24f1dfcbe0256dc21f6494abf1abf3b4d6549a66e27273
|
7
|
+
data.tar.gz: e9dd8a9de48ebe65dc4d14de5156cfe0271f23f0c23d1d64779562fe9b6dec13b165eca979fbba4c85e014eda119f7366aa1ad37c8485e438de537e7d9814215
|
data/README.md
CHANGED
@@ -25,11 +25,18 @@ Or install it yourself as:
|
|
25
25
|
Generate a new instance, takes in training text.
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
sentence_count =
|
29
|
-
|
28
|
+
sentence_count = 2
|
29
|
+
|
30
|
+
training_text = "Y Combinator., raising a round, Series A, cash flow, scalability, uber for X, next big thing., Steve Jobs, MVP, TechCruch!, hacker, code, big data, hackernews, designernews, sublime text, code artisan, ruby on rails, AWS, digitalocean."
|
31
|
+
|
32
|
+
generator = Simplelorem::Generator.new(training_text))
|
30
33
|
generator.generate(sentence_count)
|
34
|
+
|
35
|
+
> Sublime text hacker uber for X cash flow code artisan. Y combinator code sublime text raising a round uber for X Series A ruby on rails next big thing.
|
31
36
|
```
|
32
37
|
|
33
|
-
|
38
|
+
+ __Training text is expected to be tokenized by commas.__ It will automatically prune extra whitespace and punctuation.
|
39
|
+
|
40
|
+
+ The generator will then take care of punctuation, capitlization, and delimeters like commas and semicolons at runtime.
|
34
41
|
|
35
|
-
|
42
|
+
+ Sentence length is random from 6 to 22 words.
|
data/lib/simplelorem/version.rb
CHANGED