Skip to content

Commit

Permalink
Update README.md for PR #93
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Jul 15, 2019
1 parent 8b8d8a8 commit 0a45fec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -94,6 +94,14 @@ model_combo = markovify.combine([ model_a, model_b ], [ 1.5, 1 ])

... would combine `model_a` and `model_b`, but place 50% more weight on the connections from `model_a`.

### Working with messy tesxt

Starting with `v0.7.2`, `markovify.Text` accepts two additional parameters: `well_formed` and `reject_reg`.

- Setting `well_formed = False` skips the step in which input sentences are rejected if they contain one of the 'bad characters' (i.e. `()[]'"`)

- Setting `reject_reg` to a regular expression of your choice allows you change the input-sentence rejection pattern. This only applies if `well_formed` is True, and if the expression is non-empty.


### Extending `markovify.Text`

Expand Down Expand Up @@ -260,5 +268,6 @@ Many thanks to the following GitHub users for contributing code and/or ideas:
- [@tsunaminoai](https://github.com/tsunaminoai)
- [@MatthewScholefield](https://github.com/MatthewScholefield)
- [@danmayer](https://github.com/danmayer)
- [@kade-robertson](https://github.com/kade-robertson)

Initially developed at [BuzzFeed](https://www.buzzfeed.com).

0 comments on commit 0a45fec

Please sign in to comment.