nodebox / seed

Procedural Content Generator
https://seed.emrg.be/
MIT License
22 stars 8 forks source link

Gender specification in sketches #15

Open kunal-mohta opened 6 years ago

kunal-mohta commented 6 years ago

Right now if the user wants to include a gender specific word like his/her, he/she, etc., then it needs to be hard coded. What it means that the user will have know before hand what the gender is. Maybe you could add a way to let user specify the statement to be used for a particular gender.

It could be done in the following way -

root:
- (male) {{ giver }} did his job.
- (female) {{giver}} did her job.

This is just a suggestive syntax. It should obviously be decided by you.

fdb commented 6 years ago

To generalize this problem, we could introduce a system of dictionary lookups that can match keys to values. In the gender case, it could match names to pronouns, for example.

JavaScript uses the {key: value} syntax for this, which I like. I'm not sure where we would put these dictionaries, though.

kunal-mohta commented 6 years ago

I don't quite understand what you are suggesting. Can you please elaborate.

TanviKumar commented 6 years ago

I believe the solution to this can be extended to a lot more than just gender. Saying that if a certain word is used, in this case a person's name, another particular word or set of words should be used elsewhere, in this case, the pronouns. Hence the key : value structure. Is this understanding right?

On 19 Feb 2018 21:42, "k-cap" notifications@github.com wrote:

I don't quite understand what you are suggesting. Can you please elaborate.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nodebox/seed/issues/15#issuecomment-366738321, or mute the thread https://github.com/notifications/unsubscribe-auth/AR21hZDQB1IC48dMyFiEhjmzlHSOt4d8ks5tWZ18gaJpZM4SKnFN .

kunal-mohta commented 6 years ago

Can you give an example of the key:value structure.

TanviKumar commented 6 years ago

Female :

Male :

Now saying that Female is associated with her/she/ and Male with he/him etc. Extending same to other things. Key her would be female or male I believe

On 19 Feb 2018 22:05, "k-cap" notifications@github.com wrote:

Can you give an example of the key:value structure.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nodebox/seed/issues/15#issuecomment-366744726, or mute the thread https://github.com/notifications/unsubscribe-auth/AR21hcXQhHUJwPQFsh-b6Phbk0NyblFRks5tWaLPgaJpZM4SKnFN .

kunal-mohta commented 6 years ago

I think @fdb mentioned that the names should be matched to the pronouns, which means it should be like Tarun : his, I guess. As of the question about where should these be I guess the following way suits -

giver:
- Tarun { gender : male }

We can then have our own dictionary specified like -

male => {
    pronoun : he,
    determiner : his
    ....
}

And then user can directly use {{ giver.pronoun }}, where if in the random seed Tarun is chosen, then we already know that we have to use the grammar for male.

fdb commented 6 years ago

I'm not quite sure how it would work. I think we need to look at it more generally, not just as a gender-specifier but as a generic mapping from keys to values. I'm open to suggestions for how the syntax might look...

kunal-mohta commented 6 years ago

I think what I suggested earlier can help the user to write of the generic cases. However, as the developers of the language, you could only provide the user with the syntax, how they are able to use that to achieve what they want, largely depends on how they implement it. There are huge number of cases related to this, like how verbs can take different forms if the options have both singular and plural objects. But I think these would be a task for the user to decide on how to use the existing syntax to achieve the required result.