Skip to content

Commit

Permalink
Merge pull request #7 from spencermountain/one-more-time
Browse files Browse the repository at this point in the history
5.0.0
  • Loading branch information
spencermountain authored Feb 3, 2023
2 parents db643e9 + 1bdffb2 commit db724cf
Show file tree
Hide file tree
Showing 61 changed files with 76,426 additions and 966 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ let model = learn(pairs)
let out = convert('walk', model)
// 'walked'
```

you can pass-in options:
```js
let opts={
threshold:80, //how sloppy our initial rules can be
min:0, //rule must satisfy # of pairs
reverse:true, //compute backward transformation, too
}
let model = learn(pairs, opts)
```
<!-- spacer -->
<img height="50px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>

Expand Down Expand Up @@ -137,7 +147,7 @@ let model = learn(pairs, {reverse: false})
let out = convert('ok', model)
// 'right'
```

<!--
### Classify
the model can also be used to classify whether a given word belongs to either Left or Right sides.
Expand All @@ -155,7 +165,7 @@ out = classify('waited', model)
// null
```
Unlike convert, the classifier is not guarnteed to return 100% on the training data.
The classifier will generally hit high-90s on the given dataset, but how-well it generalizes to novel input is up-to the dataset.
The classifier will generally hit high-90s on the given dataset, but how-well it generalizes to novel input is up-to the dataset. -->

<!-- spacer -->
<img height="50px" src="https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png"/>
Expand Down
1 change: 0 additions & 1 deletion builds/suffix-thumb-client.js

This file was deleted.

5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

### 5.0.0 [Feb 2023]
- **[breaking]** - model format change
- **[change]** - smaller, faster builds
- **[new]** - support `{min, threshold, reverse}` options

### 4.0.0 [Jan 2022]
- **[breaking]** - model format change
- **[new]** - add classifier, test
Expand Down
165 changes: 165 additions & 0 deletions compres.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
import { compress } from './src/index.js'
import packObj from '/Users/spencer/mountain/suffix-thumb/src/pack/packObj.js'


let model = {
fwd: {
'': 'ons',
e: 'ons',
loir: 'udrons',
faire: 'ferons',
reler: 'rellerons'
},
both: {
rceler: 'rcellerons',
paqueter: 'paquèterons',
nceler: 'ncellerons',
meler: 'mellerons',
veler: 'vellerons',
seler: 'sellerons',
teler: 'tellerons',
peler: 'pellerons',
neler: 'nellerons',
ourir: 'ourrons',
uvoir: 'uvrons',
evoir: 'evrons',
eter: 'etterons',
'quérir': 'querrons',
geler: 'gèlerons',
uyer: 'uierons',
venir: 'viendrons',
oyer: 'oierons',
eser: 'èserons',
emer: 'èmerons',
ener: 'ènerons',
ever: 'èverons'
},
rev: {
iendrons: 'enir',
'èterons': 'eter',
'èlerons': 'eler',
audrons: 'aloir',
irons: 'ir',
trons: 'tre',
orons: 'ore',
urons: 'ure',
prons: 'pre',
derons: 'der',
rerons: 'rer',
herons: 'her',
gerons: 'ger',
berons: 'ber',
airons: 'aire',
uerons: 'uer',
perons: 'per',
cerons: 'cer',
ferons: 'fer',
xerons: 'xer',
yerons: 'yer',
kerons: 'ker',
zerons: 'zer',
'éerons': 'éer',
rdrons: 'rdre',
ivrons: 'ivre',
sserons: 'sser',
iserons: 'iser',
inerons: 'iner',
ulerons: 'uler',
aserons: 'aser',
iterons: 'iter',
oudrons: 'oudre',
fierons: 'fier',
pterons: 'pter',
amerons: 'amer',
olerons: 'oler',
sterons: 'ster',
plerons: 'pler',
userons: 'user',
cterons: 'cter',
iverons: 'iver',
indrons: 'indre',
rnerons: 'rner',
nnerons: 'nner',
nterons: 'nter',
averons: 'aver',
anerons: 'aner',
imerons: 'imer',
rmerons: 'rmer',
gnerons: 'gner',
unerons: 'uner',
uterons: 'uter',
yserons: 'yser',
oterons: 'oter',
oserons: 'oser',
sierons: 'sier',
rierons: 'rier',
rterons: 'rter',
uverons: 'uver',
lterons: 'lter',
blerons: 'bler',
mmerons: 'mmer',
hierons: 'hier',
ruirons: 'ruire',
duirons: 'duire',
glerons: 'gler',
alerons: 'aler',
clerons: 'cler',
tierons: 'tier',
'âterons': 'âter',
ilerons: 'iler',
'éserons': 'éser',
rserons: 'rser',
umerons: 'umer',
'élerons': 'éler',
'ûlerons': 'ûler',
aterons: 'ater',
flerons: 'fler',
rrellerons: 'rreler',
omerons: 'omer',
crirons: 'crire',
onerons: 'oner',
nierons: 'nier',
'éterons': 'éter',
nserons: 'nser',
ondrons: 'ondre',
rverons: 'rver',
'ôlerons': 'ôler',
lserons: 'lser',
'ûterons': 'ûter',
'émerons': 'émer',
mnerons: 'mner',
'îterons': 'îter',
'înerons': 'îner',
dierons: 'dier',
rlerons: 'rler',
lierons: 'lier',
'êlerons': 'êler',
cierons: 'cier',
'énerons': 'éner',
vierons: 'vier',
'êterons': 'êter',
pierons: 'pier',
lmerons: 'lmer',
'ïserons': 'ïser',
overons: 'over',
dlerons: 'dler',
gierons: 'gier',
'ônerons': 'ôner',
illerons: 'iller',
itterons: 'itter',
pendrons: 'pendre',
tendrons: 'tendre',
allerons: 'aller',
atterons: 'atter',
otterons: 'otter',
utterons: 'utter',
ollerons: 'oller',
cendrons: 'cendre',
ueillerons: 'ueillir',
fendrons: 'fendre',
rendrons: 'rendre'
},
ex: { aller: 'irons', 'être': 'serons' }
}
// console.log(compress(model))
console.log(packObj(model.both))
Loading

0 comments on commit db724cf

Please sign in to comment.