gendered person names possible, see README

This commit is contained in:
Aarne Ranta
2025-05-17 10:05:20 +02:00
parent 034f3a4771
commit e709d73607
6 changed files with 2574 additions and 9 deletions

View File

@@ -15,16 +15,35 @@ GF RGL and evaluate the text generated by this. The steps to take are the follow
- in grammars/, copy `NobelEng.gf` to `NobelDan.gf` and do the necessary changes
- in grammars/, start GF and `import NobelDan.gf`, to do some testing
- in grammars/ outside GF, do `gf -make NobelEng.gf NobelDan.gf`
- in scripts/, generate all texts with `python3 describe_nobel.py Dan`
- (if possible, do this, but see woraround below) in scripts/, generate all texts with `python3 describe_nobel.py Dan`
The last step requires `pip3 install pgf`.
Replace da and Dan with your own language codes!
More instructions and demos are given in the lectures of the week 5-9 May 2025.
The last step above requires `pip3 install pgf`.
If you don't manage to install pgf, a quick way to test is, in GF,
```
import NobelEng.gf
rf -file="../data/trees.gft" -lines -tree | l
```
## If you need gender agreement of nakes
(This note was added late, and is therefore not required at the 2025 course)
In some languages, names of laureates requires gender agreement.
In that case, use the GF command
```
rf -file="../data/gendertrees.gft" -lines -tree | l
```
or, if it works for you, the Python command
```
python3 describe_nobel.py Dan gender
```
This requires you to define linearizations of the gender-specific functions `MaleName` and `FemaleName` so that the gender agreement is set properly.
The following works for many languages:
```
FemaleName s = mkNP (mkPN s.s feminine) ;
```