Auto-declension improvements
This commit is contained in:
parent
a1a6370eee
commit
01b11fde0b
12
App.jsx
12
App.jsx
@ -64,7 +64,15 @@ function formatMorphology(entry) {
|
|||||||
if (!decl) {
|
if (!decl) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return `Abs: ${decl.abs}, Erg: ${decl.erg}, Adp: ${decl.adp}`;
|
return (<span style={ {fontSize: 'medium', color: '#6a3131'} } >
|
||||||
|
Abs: <i>{decl.abs}</i>, Erg: <i>{decl.erg}</i>,
|
||||||
|
Adp: <i>{decl.adp}</i>,
|
||||||
|
All: <i>{decl.all}</i>,
|
||||||
|
Loc: <i>{decl.loc}</i>,
|
||||||
|
Ell: <i>{decl.ell}</i>,
|
||||||
|
Inst: <i>{decl.inst}</i>,
|
||||||
|
Rel: <i>{decl.rel}</i>
|
||||||
|
</span>);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Results extends Component {
|
class Results extends Component {
|
||||||
@ -92,7 +100,7 @@ class Results extends Component {
|
|||||||
const results = this.props.searchResults;
|
const results = this.props.searchResults;
|
||||||
return(
|
return(
|
||||||
<div className='results'>
|
<div className='results'>
|
||||||
{ results ? this.content() : "No search" }
|
{ results ? this.content() : "No search" }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,10 +24,17 @@ function declineSaimiar(entry) {
|
|||||||
|
|
||||||
function vowelDeclension(sai) {
|
function vowelDeclension(sai) {
|
||||||
const { root, ending } = rootEndingPair(sai);
|
const { root, ending } = rootEndingPair(sai);
|
||||||
|
const adpEnding = ending == "u" ? "ys" : `${ending}s`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"abs": `${root}${ending}`,
|
"abs": `${root}${ending}`,
|
||||||
"erg": `${root}${ending}na`,
|
"erg": `${root}${ending}na`,
|
||||||
"adp": `${root}${ending}s`,
|
"adp": `${root}${adpEnding}`,
|
||||||
|
"all": `so${root}${adpEnding}`,
|
||||||
|
"loc": `${root}${ending}xa`,
|
||||||
|
"ell": `tlê${root}${adpEnding}`,
|
||||||
|
"inst": `${root}${ending}ŕa`,
|
||||||
|
"rel": `${root}${ending}źi`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,17 +42,30 @@ function aiDeclension(sai) {
|
|||||||
const { root, ending } = rootEndingPair(sai);
|
const { root, ending } = rootEndingPair(sai);
|
||||||
return {
|
return {
|
||||||
"abs": `${root}${ending}`,
|
"abs": `${root}${ending}`,
|
||||||
"erg": `${root}${ending}na`,
|
"erg": `${root}iad`,
|
||||||
"adp": `${root}${ending}s`,
|
"adp": `${root}i`,
|
||||||
|
"all": `so${root}i`,
|
||||||
|
"loc": `${root}iath`,
|
||||||
|
"ell": `tlê${root}i`,
|
||||||
|
"inst": `${root}iar`,
|
||||||
|
"rel": `${root}iai`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function consonantDeclension(sai) {
|
function consonantDeclension(sai) {
|
||||||
const { root, ending } = rootEndingPair(sai);
|
const split = rootEndingPair(sai);
|
||||||
|
const root = split.ending == 'ø' ? split.root : sai;
|
||||||
|
const absFinal = split.ending == 'ø' ? 'ø' : '';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"abs": `${root}${ending}`,
|
"abs": `${root}${absFinal}`,
|
||||||
"erg": `${root}${ending}na`,
|
"erg": `${root}ad`,
|
||||||
"adp": `${root}${ending}s`,
|
"adp": `${root}e`,
|
||||||
|
"all": `so${root}i`,
|
||||||
|
"loc": `${root}ak`,
|
||||||
|
"ell": `tlê${root}i`,
|
||||||
|
"inst": `${root}ar`,
|
||||||
|
"rel": `${root}ai`
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user