diagram in readme

This commit is contained in:
adueck 2023-08-21 14:29:21 +04:00
parent ae9ab8f5d6
commit 0b34419482
8 changed files with 2013 additions and 2 deletions

View File

@ -9,6 +9,8 @@ A pashto inflection, verb conjugation, and phrase-generation engine, as well as
#### [Pashto Inflector Website/Demo](https://pashto-inflector.lingdocs.com)
![pashto-inflector software diagram](./diagrams/diagram-light.png)
## How it works
This library uses a 3-step process to generate gramattically correct Pashto phrases. This 3-step process corresponds directly to Chomsky's tripartrite structure for tranformational generative grammars.
@ -37,7 +39,7 @@ The dictionary entries for the words are inflected and conjugated as necessary.
The inflected words are arranged into possible phrases with various options for dropping or encliticizing pronouns, and placing the negation particle in the correct place(s).
![Phrase building process](./full-phrase-process.svg)
![Phrase building process](./diagrams/full-phrase-process.svg)
* The full process of phrase building
## Distributions

BIN
diagrams/diagram-light.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 KiB

2000
diagrams/diagram.excalidraw Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -47,6 +47,7 @@ export function parseBlocks(
// },
// ];
// }
console.log({ allResults });
return bindParseResult(allResults, (tokens, r) => {
const errors: T.ParseError[] = [];
if ("kids" in r) {

View File

@ -32,7 +32,7 @@ export function parsePH(
// TODO: maybe it would be better to only do this splitting off of the perfect head
// if the next thing could be a kids section
return phs
.filter((p) => first.s.startsWith(p))
.filter((p) => first.s.startsWith(p) && first.s.length > p.length)
.flatMap((ph) =>
returnParseResult(
[

View File

@ -11,6 +11,7 @@ import {
} from "./irreg-verbs";
// big problem ما سړی یوړ crashes it !!
// BIG problem - issue with و being considered a VB for a lot of little verbs like بلل
// TODO: کول verbs!
// check that aawu stuff is working

View File

@ -28,6 +28,13 @@ import { isFirstOrSecondPersPronoun } from "../phrase-building/render-vp";
// ومې لیدې
// ویې وهم
// this should also conjugate to
// وامې نه خیسته
// وامې نه خیستلو
// waa-me nú kheestulo
// وامې نه اخیست
// waa-me nú akheest
// TODO: add tests for negatives and negative order
// TODO: imperfective past should also be "was going to / would have"
// map over transitivities, to give transitive / gramm. transitive optionns