Good words for "before" and "after" that sort the same, both logically and alphabetically?
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
"Anterior" and "posterior" happen to satisfy that criterion.
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.
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.