de-compromise 0.0.2 → 0.0.3
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.
package/README.md
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
<a href="https://npmjs.org/package/de-compromise">
|
|
18
18
|
<img src="https://img.shields.io/npm/v/de-compromise.svg?style=flat-square" />
|
|
19
19
|
</a>
|
|
20
|
-
<a href="https://codecov.io/gh/spencermountain/de-compromise">
|
|
20
|
+
<!-- <a href="https://codecov.io/gh/spencermountain/de-compromise">
|
|
21
21
|
<img src="https://codecov.io/gh/spencermountain/de-compromise/branch/master/graph/badge.svg" />
|
|
22
|
-
</a>
|
|
22
|
+
</a> -->
|
|
23
23
|
<a href="https://bundlephobia.com/result?p=de-compromise">
|
|
24
24
|
<img src="https://badge-size.herokuapp.com/spencermountain/de-compromise/master/builds/de-compromise.min.js" />
|
|
25
25
|
</a>
|
|
@@ -42,11 +42,22 @@ Das Ziel dieses Projekts ist es, einen kleinen, einfachen, regelbasierten POS-Ta
|
|
|
42
42
|
|
|
43
43
|
```js
|
|
44
44
|
import ldv from 'de-compromise'
|
|
45
|
-
|
|
45
|
+
|
|
46
|
+
let dok = ldv('Werden wir Helden für einen Tag.')
|
|
46
47
|
dok.match('#Noun').out('array')
|
|
47
48
|
// [ 'wir', 'Helden', 'Tag.' ]
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
```html
|
|
52
|
+
<script type="text/javascript" src="https://unpkg.com/de-compromise"></script>
|
|
53
|
+
<script>
|
|
54
|
+
let txt = 'Hast du etwas Zeit für mich? Dann singe ich ein Lied für dich'
|
|
55
|
+
let doc = deCompromise(txt) //globalen Namensraum
|
|
56
|
+
console.log(doc.sentences(1).json())
|
|
57
|
+
// { text:'Dann singe...', terms:[...] }
|
|
58
|
+
</script>
|
|
59
|
+
```
|
|
60
|
+
|
|
50
61
|
Bitte beitreten, um zu helfen! - please join to help!
|
|
51
62
|
|
|
52
63
|
<!-- spacer -->
|