Support adding puncutations to text for node-addon-api (#876)
This commit is contained in:
15
scripts/node-addon-api/lib/punctuation.js
Normal file
15
scripts/node-addon-api/lib/punctuation.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const addon = require('./addon.js');
|
||||
|
||||
class Punctuation {
|
||||
constructor(config) {
|
||||
this.handle = addon.createOfflinePunctuation(config);
|
||||
this.config = config;
|
||||
}
|
||||
addPunct(text) {
|
||||
return addon.offlinePunctuationAddPunct(this.handle, text);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
Punctuation,
|
||||
}
|
||||
Reference in New Issue
Block a user