2

TL;DR - Silly question looking for better words.

I have a list of event labels in a computer program similar to:

  • renderer_before
  • renderer_after
  • before_notify
  • after_notify

This is all well and good...those names convey the context of each event succinctly and accurately.

BUT! It bugs me that "before" comes after "after" when sorted alphabetically. Same for "pre" and "post".

What is a good pair of words that indicates a relative sequence between two things, that just happens to alphabetically sort in the same order?

5
  • 1
    The word "following" could be substituted for "after". And in some contexts possibility, "last" and "next".
    – Steve
    Commented Feb 10, 2021 at 21:15
  • 1
    I’m voting to close this question because it involves trivia. Where words occur in a dictionary is off-topic on ELU. Commented Apr 19, 2021 at 14:47
  • 2
    afore / after (I'm so OCD, I need these to have the same character count.) Commented Apr 19, 2021 at 18:42
  • 1
    Actually, the proper order of the letters is "CDO".
    – Hot Licks
    Commented Apr 20, 2021 at 22:08
  • Sort in reverse alphabetical order.
    – jimm101
    Commented Jun 13, 2023 at 16:18

5 Answers 5

7
+50

Saw this post in https://stackoverflow.com/questions/66144666/words-for-pre-post-or-before-after-that-sort-the-same-logically-and-alph and I thought it was criminal that the question was closed.

I wrote a script to help find candidate pairs that satisfy the (entirely objective, and IMO subjectively righteous) criteria.

def the_important_questions_in_life():
    """
    https://www.guru99.com/wordnet-nltk.html
    https://english.stackexchange.com/questions/560104/good-words-for-before-and-after-that-sort-the-same-both-logically-and-alpha?newreg=acc68d7cb6aa400abed569edbdb4bfab
    https://stackoverflow.com/questions/66144666/words-for-pre-post-or-before-after-that-sort-the-same-logically-and-alph
    """

    import nltk
    nltk.download('wordnet')
    from nltk.corpus import wordnet

    before_queries = [
        'before', 'pre', 'anterior', 'prior', 'first', 'start', 'past',
        'earlier', 'predecessor', 'current', 'former',
    ]
    after_queries = [
        'after', 'subsequent', 'later', 'next', 'finish', 'successor',
        'posterior', 'future',
    ]

    synonyms = []
    antonyms = []

    for query in before_queries:
        syns = wordnet.synsets(query)
        for syn in syns:
            lems = syn.lemmas()
            for lem in lems:
                synonyms.append(lem.name())
                if lem.antonyms():
                    antonyms.append(lem.antonyms()[0].name())

    for query in after_queries:
        syns = wordnet.synsets(query)
        for syn in syns:
            lems = syn.lemmas()
            for lem in lems:
                antonyms.append(lem.name())
                if lem.antonyms():
                    synonyms.append(lem.antonyms()[0].name())

    print('synonyms = {!r}'.format(sorted(set(synonyms))))
    print('antonyms = {!r}'.format(sorted(set(antonyms))))

I wasn't able to get the synonym finder to work exactly like I wanted, so I didn't finish the script, but assuming you have an API that can find good synonyms and antonyms for words, it should be simple enough to find pairs of them that sort alphabetically.

From this programmatic search, I settled on these manually found sets of pairs:

  • earlier later
  • head tail
  • anterior posterior
  • first last
  • predecessor successor
  • current next
  • previous subsequent
  • before hereafter
  • preceding succeeding
1
  • 3
    You are a ROCK STAR! I love the positive attitude and effort you put into my admittedly frivolous request. I'm going to put a bounty on this question, just so I can shower you in manna. Commented Apr 19, 2021 at 17:20
4

"Anterior" and "posterior" happen to satisfy that criterion.

1
  • 3
    As would the Latinate adverbs ante and post. Commented Feb 10, 2021 at 21:43
3

There is a quite simple way to get what you seem to be seeking. Everyone knows the difference between a.m. (ante meridiem ) and p.m. (post meridiem).

So use ante and post, which happen to be in the appropriate alphabetical order.

1

If you're looking for modifiers that are chronologically alphabetical, I'd recommend either "prior" and "subsequent" or "ante" and "post" (e.g., The word "antebellum" mean "prior to war" and "postbellum" means "subsequent to war.")

So, using your examples:

  • renderer_prior or prior_renderer
  • renderer_subsequent or subsequent_renderer
  • ante_notify or notify_ante
  • post_notify or notify_post

Of course, there are very few adjectives that are postpositive, which none of these are, but looking at your question's examples, it doesn't appear that that matters to you.

1

'Initial' and 'Resulting/resultant'

'Begin' and 'End'

Not the answer you're looking for? Browse other questions tagged or ask your own question.