Custom Phrase Description - ligos/readablepassphrasegenerator GitHub Wiki

Custom Phrase Description

Each strength of phrase corresponds a list of clauses with probabilities for each word within those clauses. (You can see the definitions based on Clause.CreatePhraseDescription() in code). These can be defined using a basic textual syntax.

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->0, PersonalPronoun->2,
    ProperNoun->1, CommonNoun->12, AdjectiveNoun->2,
    Number->1, NoNumber->5,
    Plural->0, Single->1,
    Preposition->0, NoPreposition->1,
 }

Verb = {
    Adverb->0, NoAdverb->1,
    Interrogative->1, NoInterrogative->8,
    IntransitiveByNoNoun->0, IntransitiveByPreposition->0,
    Present->10, Past->8, Future->8, ContinuousPast->0, Continuous->0, Perfect->0, Subjunctive->0,
 }

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->0, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->1, AdjectiveNoun->0,
    Number->0, NoNumber->1,
    Plural->0, Single->1,
    Preposition->0, NoPreposition->1,
 }

Conjunction = {
    JoinsNoun->1, JoinsPhrase->0,
 }

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->0, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->1, AdjectiveNoun->0,
    Number->0, NoNumber->1,
    Plural->0, Single->1,
    Preposition->0, NoPreposition->1,
 }

There are only two major clause types, and two minor. The major ones (used in pretty much every phrase and with the most options) are:

  • Noun
  • Verb

The minor ones are simpler, but lead to significantly longer and harder to guess phrases:

  • DirectSpeech - said, shouted, etc. Used at the start of phrases to make someone say something.
  • Conjunction - and, or, etc. Used to join noun clauses together.

The general pattern these appear in are:

[Noun DirectSpeech] Noun Verb Noun [Conjunction Noun]

Clause Reference

Each clause has a variety of probabilities for words appearing within it. These choose between one or more options and are helpfully grouped line by line (ie: the choices are all on the same line). Setting something to zero means it can't happen, otherwise higher numbered items are more likely to occur. Just make sure something on the same line is on-zero; if the probability of everything is zero, the generator will explode spectacularly leaving a trail of burning debris all over your computer (OK, it isn't quite that bad, but don't expect meaningful phrases if everything is zero).

Noun Clause

  • Core noun choice:
    • CommonNoun - normal nouns like 'sunlamp' or 'mouse'
    • ProperNoun - names like 'Mary' or 'Joseph'
    • AdjectiveNoun - use an adjective in place of a noun, eg: 'the large one', or 'a hungry thing'
    • If all the above are zero, then there will be no noun.
  • Optional article, demonstrative or pronoun (eg: a, the, this, his)
  • Optional preposition (eg: amidst, in, over)
  • Optional adjective (eg: lucid, white)
  • Single or plural noun (eg: sunlamp vs sunlamps)
  • Optionally add a number (eg: the 500 sunlamps)

Verb Clause

  • Core verb tense:
    • Past, present and future were the ones I was taught in primary school.
    • But there are other tenses as well. Checking some verbs in the dictionary is the best way to see the difference.
  • Optional adverb (eg: quickly). Adverbs can appear before or after the verb, at random.
  • Optional interrogative form, which turns the phrase into a question (eg: 'why does...' or 'can...')
  • Optional way of handling intransitive verbs (verbs which don't have a subject, eg: you can't 'sat' something).
    • By excluding any noun after an intransitive verb (eg: the sunlamp sat)
    • By adding a preposition after an intransitive verb (eg: the sunlamp sat under the box)

Conjunction Clause

Has options to join nouns together or entire phrases together. The former is used extensively, the later is not.

Note that these options are mutually exclusive. You must choose to join nouns or phrases but never both (you will get an error if you try). That is, at least one must be zero.

Note that using a conjunction and an extra noun dramatically increases the number of possible combinations in a phrase. Joining entire phrases will have an insane number of combinations, and an equally long phrase.

Note that the English language imposes no limit on the number of phrases which can be joined together; 'this frobs that and that shoots this and...' is gramatically correct (if highly frowned upon by school English teachers and print editors).

DirectSpeech Clause

Has options for adding a direct speech verb or not. Eg: 'the sunlamp said...'

Using a Custom Clause

The above definitions can be customised, saved to a UTF8 text file and passed to the console app using the --phrase option. Or, set in the plugin GUI by selecting the custom phrase strength.

Phrase Reference

The 3 core descriptions are listed below (current as of version 0.17.0).

These change over time. The best way to find the current definitions is to use the plugin GUI and choose a particular phrase strength (eg: strong) then change to custom strength. The text in the custom field will be the same as the strength you just chose.

Normal Strength

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->0, PersonalPronoun->2,
    ProperNoun->1, CommonNoun->12, AdjectiveNoun->2,
    Number->1, NoNumber->5,
    Plural->0, Single->1,
    Preposition->0, NoPreposition->1,
 }

Verb = {
    Adverb->0, NoAdverb->1,
    Interrogative->1, NoInterrogative->8,
    IntransitiveByNoNoun->0, IntransitiveByPreposition->0,
    Present->10, Past->8, Future->8, ContinuousPast->0, Continuous->0, Perfect->0, Subjunctive->0,
 }

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->0, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->1, AdjectiveNoun->0,
    Number->0, NoNumber->1,
    Plural->0, Single->1,
    Preposition->0, NoPreposition->1,
 }

Strong Strength

Noun = {
    Adjective->0, NoAdjective->1,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->1, PersonalPronoun->2,
    ProperNoun->1, CommonNoun->12, AdjectiveNoun->2,
    Number->1, NoNumber->4,
    Plural->3, Single->7,
    Preposition->0, NoPreposition->1,
 }

Verb = {
    Adverb->0, NoAdverb->1,
    Interrogative->1, NoInterrogative->8,
    IntransitiveByNoNoun->0, IntransitiveByPreposition->4,
    Present->10, Past->10, Future->10, ContinuousPast->5, Continuous->5, Perfect->5, Subjunctive->2,
 }

Noun = {
    Adjective->3, NoAdjective->6,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->1, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->1, AdjectiveNoun->0,
    Number->0, NoNumber->1,
    Plural->0, Single->1,
    Preposition->1, NoPreposition->15,
 }

Insane Strength

Noun = {
    Adjective->3, NoAdjective->6,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->1, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->8, AdjectiveNoun->1,
    Number->1, NoNumber->3,
    Plural->3, Single->7,
    Preposition->0, NoPreposition->1,
 }

Verb = {
    Adverb->3, NoAdverb->10,
    Interrogative->1, NoInterrogative->8,
    IntransitiveByNoNoun->1, IntransitiveByPreposition->5,
    Present->10, Past->10, Future->10, ContinuousPast->5, Continuous->5, Perfect->5, Subjunctive->5,
 }

Noun = {
    Adjective->3, NoAdjective->6,
    NoArticle->5, DefiniteArticle->4, IndefiniteArticle->4, Demonstrative->1, PersonalPronoun->2,
    ProperNoun->0, CommonNoun->1, AdjectiveNoun->0,
    Number->0, NoNumber->1,
    Plural->3, Single->7,
    Preposition->2, NoPreposition->8,
 }