-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
154 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import Syntax from "../syntax.mjs"; | ||
import {Activation, Perceptron, BeamMEMM} from "../_jslml.mjs"; | ||
|
||
class EngSyntax extends Syntax { | ||
static list_tags = []; | ||
static w_memm = []; | ||
static b_memm = []; | ||
static maxent = new Perceptron(w_memm, b_memm, Activation.softmax, this.list_tags); | ||
static memm = new BeamMEMM(5, this.maxent); | ||
|
||
/** | ||
* Encoding all sentence words | ||
* | ||
* @protected | ||
* @final | ||
* @static | ||
* @param {String[]} sentence list of words in sentence | ||
* @return {float[[]]} encoding of each word | ||
*/ | ||
static _words_encode(sentence){ | ||
return [[]]; | ||
} | ||
|
||
} | ||
|
||
export default EngSyntax; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters