update latl README with set definition
This commit is contained in:
parent
abfe14b410
commit
9619b4a07c
4 changed files with 24 additions and 2 deletions
|
@ -14,6 +14,12 @@ Features:
|
||||||
- multi-character phone support
|
- multi-character phone support
|
||||||
- comparative runs for multiple rule sets
|
- comparative runs for multiple rule sets
|
||||||
|
|
||||||
|
## What is LATL?
|
||||||
|
|
||||||
|
[Read the specification](/src/utils/latl/README.md)
|
||||||
|
|
||||||
|
LATL is a JavaScript targeting compiled language for doing linguistic analysis and transformations.
|
||||||
|
|
||||||
## How do I use FCA?
|
## How do I use FCA?
|
||||||
|
|
||||||
An FCA run requires the user to define three parameters:
|
An FCA run requires the user to define three parameters:
|
||||||
|
|
|
@ -62,11 +62,17 @@ set PLOSIVES [ p, pʰ, t, tʼ, tʰ, ɾ, kʼ, k, kʰ ]
|
||||||
|
|
||||||
; ---- TENTATIVE!
|
; ---- TENTATIVE!
|
||||||
; ---- set feature operations - non-mutable!
|
; ---- set feature operations - non-mutable!
|
||||||
; { [ X + feature1 - feature2 ] in SET_A } FILTER: where X is any character and feature1 and feature2 are filtering features
|
; { [ + feature1 - feature2 ] in SET_A } FILTER: where feature1 and feature2 are filtering features
|
||||||
; { SET_A yield [ X + feature1 ] } TRANSFORMATION: performs transformation with (prepended or) appended character
|
; { SET_A yield [ X + feature1 ] } TRANSFORMATION: performs transformation with (prepended or) appended character
|
||||||
; { SET_A yield [ X - feature1 ] }
|
; { SET_A yield [ X - feature1 ] }
|
||||||
; { SET_A yield [ X - feature1 + feature2 ] }
|
; { SET_A yield [ X - feature1 + feature2 ] }
|
||||||
; { [ X + feature1 - feature2 ] in SET_A yield [ - feature1 + feature2 ] } combined FILTER and TRANSFROMATION
|
; { [ X + feature1 - feature2 ] in SET_A yield [ - feature1 + feature2 ] } combined FILTER and TRANSFORMATION
|
||||||
|
|
||||||
|
; ---- MAPPING
|
||||||
|
set PLOSIVES = [ p, t, k ],
|
||||||
|
FRICATIVES = [ f, s, x ],
|
||||||
|
; pairs PLOSIVES with FRICATIVES that have matching features = [ pf, ts, kx ]
|
||||||
|
AFFRICATES = { PLOSIVES yield [ X concat { [ [ X ] - fricative ] in FRICATIVES } ] }
|
||||||
|
|
||||||
; ---- example with join, character, and feature operations
|
; ---- example with join, character, and feature operations
|
||||||
; set SET_C = { [ PHONE +feature1 ] in { SET_A or SET_B } yield [ PHONE concat y ] }
|
; set SET_C = { [ PHONE +feature1 ] in { SET_A or SET_B } yield [ PHONE concat y ] }
|
||||||
|
|
|
@ -34,6 +34,16 @@ Sets are collections of pointers to phones. The GLOBAL set contains all phones,
|
||||||
#### Global Set
|
#### Global Set
|
||||||
[ GLOBAL ] is a shorthand for [ GLOBAL.SETS ]
|
[ GLOBAL ] is a shorthand for [ GLOBAL.SETS ]
|
||||||
#### Set Definition
|
#### Set Definition
|
||||||
|
Sets are defined with the set keyword followed by an equal sign and a set expression:
|
||||||
|
```
|
||||||
|
set SHORT_VOWELS = [ a, i, u ]
|
||||||
|
```
|
||||||
|
Lists of sets can be defined using a comma followed by whitespace syntax
|
||||||
|
```
|
||||||
|
set PLOSIVES = [ p, t, k ],
|
||||||
|
FRICATIVES = [ f, s, x ],
|
||||||
|
LABIALIZED_PLOSIVES = { PLOSIVES yield [ X concat ʷ ] }
|
||||||
|
```
|
||||||
#### Set Usage
|
#### Set Usage
|
||||||
#### Set Operations
|
#### Set Operations
|
||||||
##### 'and' Operation
|
##### 'and' Operation
|
||||||
|
|
Loading…
Reference in a new issue