-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working on target-specific source language models
for example: an English language model (source) which is specific to Spanish (target)
- Loading branch information
Showing
13 changed files
with
172 additions
and
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,64 @@ | ||
[{:rule :pronouns-2p | ||
:if :top | ||
:then [{}]}] | ||
:if {:canonical "you"} | ||
:then [{:agr {:number :sing} | ||
:case :nom | ||
:sense 1 | ||
:note [:informal :singular] | ||
:sem {:ref {:context :informal}}} | ||
|
||
{:agr {:gender :masc | ||
:number :plur} | ||
:sense 2 | ||
:case :nom | ||
:note [:informal :masculine :plural] | ||
:sem {:ref {:context :informal}}} | ||
|
||
{:agr {:gender :fem | ||
:number :plur} | ||
:case :nom | ||
:sense 3 | ||
:note [:informal :feminine :plural] | ||
:sem {:ref {:context :informal} | ||
:person-not :1st}} | ||
|
||
{:agr {:number :sing} | ||
:case :nom | ||
:sense 4 | ||
:note [:formal :singular] | ||
:sem {:ref {:context :formal}}} | ||
|
||
{:agr {:number :plur} | ||
:case :nom | ||
:sense 5 | ||
:note [:formal :plural] | ||
:sem {:ref {:context :formal}}} | ||
|
||
{:agr {:number :sing} | ||
:case :acc | ||
:sense 6 | ||
:note [:informal :singular] | ||
:sem {:ref {:context :informal} | ||
:person-not :1st}} | ||
|
||
{:agr {:number :plur} | ||
:case :acc | ||
:sense 7 | ||
:note [:informal :plural] | ||
:sem {:ref {:context :informal} | ||
:person-not :1st}} | ||
|
||
{:agr {:number :sing} | ||
:sense 8 | ||
:case :acc | ||
:note [:formal :singular] | ||
:sem {:ref {:context :formal} | ||
:person-not :1st}} | ||
|
||
{:agr {:person :2nd | ||
:number :plur} | ||
:sense 9 | ||
:case :acc | ||
:note [:formal :plural] | ||
:sem {:ref {:context :formal} | ||
:person-not :1st}}]}] | ||
|
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
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,29 @@ | ||
(ns menard.english.es | ||
(:require [dag_unify.core :as u] | ||
[clojure.tools.logging :as log] | ||
[menard.english :as en] | ||
[menard.english.compile :refer [compile-lexicon]] | ||
[menard.model :refer [create]])) | ||
|
||
(def model | ||
(delay (create "english/models/es" | ||
"complete" | ||
compile-lexicon false {:include-derivation? false}))) | ||
|
||
|
||
(defn analyze [surface] | ||
(en/analyze surface @model)) | ||
|
||
(defn generate [spec] | ||
(en/generate spec @model)) | ||
|
||
(defn morph [expression] | ||
(en/morph expression @model false)) | ||
|
||
(defn parse [surface] | ||
(en/parse surface @model)) | ||
|
||
(defn syntax-tree [tree] | ||
(en/syntax-tree tree @model)) | ||
|
||
|
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
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
Oops, something went wrong.