Skip to content

Commit

Permalink
another readme fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trinker committed Jan 21, 2017
1 parent d85581d commit 28bf10c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
15 changes: 15 additions & 0 deletions README.Rmd
Expand Up @@ -44,6 +44,7 @@ The main functions, task category, & descriptions are summarized in the table be
| `replace_contractions` | replacement | Replace contractions with both words |
| `replace_emoticon` | repalcement | Replace emoticons with word equivalent |
| `replace_grade` | repalcement | Replace grades (e.g., "A+") with word equivalent |
| `replace_html` | replacement | Replace HTML tags and symbols |
| `replace_incomplete` | replacement | Replace incomplete sentence end-marks |
| `replace_non_ascii` | replacement | Replace non-ascii with equivalent or remove |
| `replace_number` | replacement | Replace common numbers |
Expand All @@ -52,6 +53,7 @@ The main functions, task category, & descriptions are summarized in the table be
| `replace_symbol` | replacement | Replace common symbols |
| `replace_white` | replacement | Replace regex white space characters |
| `add_comma_space` | repalcement | Replace non-space after comma |
| `add_missing_endmark` | repalcement | Replace missing endmarks with desired symbol |
| `check_text` | check | Text report of potential issues |
| `has_endmark` | check | Check if an element has an end-mark |

Expand Down Expand Up @@ -237,6 +239,19 @@ text <- c(
replace_grade(text)
```

### HTML

Sometimes HTML tags and symbols stick around like pesky gnats. The `replace_html` function makes light work of them.

```{r}
x <- c(
"<bold>Random</bold> text with symbols: &nbsp; &lt; &gt; &amp; &quot; &apos;",
"<p>More text</P> &cent; &pound; &yen; &euro; &copy; &reg;"
)
replace_html(x)
```

### Incomplete Sentences

Sometimes an incomplete sentence is denoted with multiple end marks or no punctuation at all. `replace_incomplete` standardizes these sentences with a pipe (`|`) endmark (or one of the user's choice).
Expand Down
42 changes: 34 additions & 8 deletions README.md
Expand Up @@ -37,6 +37,7 @@ Table of Contents
- [Contractions](#contractions)
- [Emoticons](#emoticons)
- [Grades](#grades)
- [HTML](#html)
- [Incomplete Sentences](#incomplete-sentences)
- [Non-ASCII Characters](#non-ascii-characters)
- [Numbers](#numbers)
Expand Down Expand Up @@ -122,45 +123,55 @@ table below:
<td align="left">Replace grades (e.g., &quot;A+&quot;) with word equivalent</td>
</tr>
<tr class="even">
<td align="left"><code>replace_html</code></td>
<td align="left">replacement</td>
<td align="left">Replace HTML tags and symbols</td>
</tr>
<tr class="odd">
<td align="left"><code>replace_incomplete</code></td>
<td align="left">replacement</td>
<td align="left">Replace incomplete sentence end-marks</td>
</tr>
<tr class="odd">
<tr class="even">
<td align="left"><code>replace_non_ascii</code></td>
<td align="left">replacement</td>
<td align="left">Replace non-ascii with equivalent or remove</td>
</tr>
<tr class="even">
<tr class="odd">
<td align="left"><code>replace_number</code></td>
<td align="left">replacement</td>
<td align="left">Replace common numbers</td>
</tr>
<tr class="odd">
<tr class="even">
<td align="left"><code>replace_ordinal</code></td>
<td align="left">replacement</td>
<td align="left">Replace common ordinal number form</td>
</tr>
<tr class="even">
<tr class="odd">
<td align="left"><code>replace_rating</code></td>
<td align="left">repalcement</td>
<td align="left">Replace ratings (e.g., &quot;10 out of 10&quot;, &quot;3 stars&quot;) with word equivalent</td>
</tr>
<tr class="odd">
<tr class="even">
<td align="left"><code>replace_symbol</code></td>
<td align="left">replacement</td>
<td align="left">Replace common symbols</td>
</tr>
<tr class="even">
<tr class="odd">
<td align="left"><code>replace_white</code></td>
<td align="left">replacement</td>
<td align="left">Replace regex white space characters</td>
</tr>
<tr class="odd">
<tr class="even">
<td align="left"><code>add_comma_space</code></td>
<td align="left">repalcement</td>
<td align="left">Replace non-space after comma</td>
</tr>
<tr class="odd">
<td align="left"><code>add_missing_endmark</code></td>
<td align="left">repalcement</td>
<td align="left">Replace missing endmarks with desired symbol</td>
</tr>
<tr class="even">
<td align="left"><code>check_text</code></td>
<td align="left">check</td>
Expand Down Expand Up @@ -428,7 +439,7 @@ And if all is well the user should be greeted by a cow:
##
## -------
## No problems found!
## You are transcendent!
## You are wickedly awesome!
## --------
## \ ^__^
## \ (oo)\ ________
Expand Down Expand Up @@ -796,6 +807,21 @@ this task.
## [3] "It's slightly above average+ work"
## [4] "very excellent excellent poor example deserves a slightly above average!"

### HTML

Sometimes HTML tags and symbols stick around like pesky gnats. The
`replace_html` function makes light work of them.

x <- c(
"<bold>Random</bold> text with symbols: &nbsp; &lt; &gt; &amp; &quot; &apos;",
"<p>More text</P> &cent; &pound; &yen; &euro; &copy; &reg;"
)

replace_html(x)

## [1] "Random text with symbols: < > & \" '"
## [2] "More text cents pounds yen euro (c) (r)"

### Incomplete Sentences

Sometimes an incomplete sentence is denoted with multiple end marks or
Expand Down

0 comments on commit 28bf10c

Please sign in to comment.