de-compromise 0.0.2 → 0.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.
package/README.md CHANGED
@@ -10,6 +10,11 @@
10
10
  </sub>
11
11
  </div>
12
12
  <img height="25px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
13
+ <div align="center">
14
+ <sub>see:
15
+ <a href="https://github.com/nlp-compromise/fr-compromise">french</a> • <a href="https://github.com/nlp-compromise/es-compromise">spanish</a> • <a href="https://github.com/spencermountain/compromise">english</a>
16
+ </sub>
17
+ </div>
13
18
  </div>
14
19
 
15
20
  <div align="center">
@@ -17,9 +22,9 @@
17
22
  <a href="https://npmjs.org/package/de-compromise">
18
23
  <img src="https://img.shields.io/npm/v/de-compromise.svg?style=flat-square" />
19
24
  </a>
20
- <a href="https://codecov.io/gh/spencermountain/de-compromise">
25
+ <!-- <a href="https://codecov.io/gh/spencermountain/de-compromise">
21
26
  <img src="https://codecov.io/gh/spencermountain/de-compromise/branch/master/graph/badge.svg" />
22
- </a>
27
+ </a> -->
23
28
  <a href="https://bundlephobia.com/result?p=de-compromise">
24
29
  <img src="https://badge-size.herokuapp.com/spencermountain/de-compromise/master/builds/de-compromise.min.js" />
25
30
  </a>
@@ -42,11 +47,37 @@ Das Ziel dieses Projekts ist es, einen kleinen, einfachen, regelbasierten POS-Ta
42
47
 
43
48
  ```js
44
49
  import ldv from 'de-compromise'
45
- var dok= ldv('Werden wir Helden für einen Tag.')
50
+
51
+ let dok = ldv('Werden wir Helden für einen Tag.')
46
52
  dok.match('#Noun').out('array')
47
53
  // [ 'wir', 'Helden', 'Tag.' ]
48
54
  ```
49
55
 
56
+ ### Parsing von Zahlen / Number parsing
57
+ es kann Zahlen in natürlicher Sprache analysieren und formatieren
58
+ ```js
59
+ let doc = ldv('Ich habe einhunderteinundzwanzig Euro')
60
+ doc.numbers().minus(10)
61
+ doc.text()
62
+ // 'Ich habe einhundertelf Euro'
63
+ ```
64
+
65
+ <!-- spacer -->
66
+ <img height="15px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
67
+
68
+ oder im Browser:
69
+ ```html
70
+ <script src="https://unpkg.com/de-compromise"></script>
71
+ <script>
72
+ let txt = 'Hast du etwas Zeit für mich? Dann singe ich ein Lied für dich'
73
+ let doc = deCompromise(txt) //globalen Namensraum
74
+ console.log(doc.sentences(1).json())
75
+ // { text:'Dann singe...', terms:[ ... ] }
76
+ </script>
77
+ ```
78
+
79
+ see [en-compromise/api](https://github.com/spencermountain/compromise#api) for full API documentation.
80
+
50
81
  Bitte beitreten, um zu helfen! - please join to help!
51
82
 
52
83
  <!-- spacer -->
@@ -57,6 +88,8 @@ Bitte beitreten, um zu helfen! - please join to help!
57
88
  </h2>
58
89
 
59
90
 
91
+
92
+
60
93
  ### Beitragen / Contributing
61
94
  ```
62
95
  git clone https://github.com/nlp-compromise/de-compromise.git
@@ -87,4 +120,7 @@ npm watch
87
120
  </tr>
88
121
  </table>
89
122
 
123
+ ### See also
124
+ * [dweiss/compound-splitter](https://github.com/dweiss/compound-splitter) - german compound-word splitter
125
+ * [danielnaber/jwordsplitter](https://github.com/danielnaber/jwordsplitter) - Java compound-word splitter
90
126
  MIT