Skip to content

Instantly share code, notes, and snippets.

@alex-d-boyd
Created January 31, 2020 10:43
Show Gist options
  • Save alex-d-boyd/9ce875a45d6e4ef8e04eb9f846f8215d to your computer and use it in GitHub Desktop.
Save alex-d-boyd/9ce875a45d6e4ef8e04eb9f846f8215d to your computer and use it in GitHub Desktop.
Buzzsentence and buzzphrase generator
{
"sentences": [
[
"In particular,",
"On the other hand,",
"However,",
"Similarly,",
"As a resultant implication,",
"In this regard,",
"Based on integral subsystem considerations,",
"For example,",
"Thus,",
"In respect to specific goals,"
],
[
"a large portion of the interface co-ordination communication",
"a constant flow of effective information",
"the characterisation of specific criteria",
"initiation of critical subsystem development",
"the fully integrated test program",
"the product configuration baseline",
"any associated supporting element",
"the incorporation of additional mission constraints",
"the independent functional principle",
"a primary interrelationship between system and/or subsystem technologies"
],
[
"must utilise and be functionally interwoven with",
"maximises the probability of project success and minimises the cost and time required for",
"adds explicit performance limits to",
"necessitates that urgent consideration be applied to",
"requires considerable systems analysis and trade-off studies to arrive at",
"is further compounded, when taking into account",
"presents extremely interesting challenges to",
"recognises the importance of other systems and the necessity for",
"may not work with",
"adds overriding performance constraints to"
],
[
"the sophisticated hardware.",
"the anticipated fourth-generation equipment.",
"the subsystem compatibility testing.",
"the structural design, based on system engineering concepts.",
"the preliminary qualification limit.",
"the evolution of specifications over a given time period.",
"the philosophy of commonality and standardisation.",
"the greater fight-worthiness concept.",
"any discrete configuration mode.",
"the total system rationale."
]
],
"phrases": [
[
"Integrated",
"Total",
"Systematised",
"Parallel",
"Functional",
"Responsive",
"Optical",
"Synchronised",
"Compatible",
"Balanced"
],
[
"management",
"organisational",
"monitored",
"reciprocal",
"digital",
"logic",
"transitional",
"incremental",
"third-generation",
"policy"
],
[
"options",
"flexibility",
"capability",
"mobility",
"programming",
"concept",
"time-phase",
"projection",
"hardware",
"contingency"
]
]
}
#! /usr/bin/env python3
import json
import os.path
import random
__all__ = ['make_buzz', 'sentence_parts', 'phrase_parts']
PARTS_FILE = os.path.join(os.path.dirname(__file__),
'buzz_parts.json')
def _load_parts():
with open(PARTS_FILE, 'r', encoding='utf_8') as fobj:
all_parts = json.load(fobj)
sentence_parts = all_parts['sentences']
phrase_parts = all_parts['phrases']
return sentence_parts, phrase_parts
def make_buzz(parts):
return ' '.join(random.choice(p) for p in parts)
sentence_parts, phrase_parts = _load_parts()
if __name__ == '__main__':
if random.random() > 0.5:
print(make_buzz(sentence_parts))
else:
print(make_buzz(phrase_parts))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment