I'm trying to learn if there is a way to utilize ML to find out a list of contextual synonyms for a word in a sentence. I know of some obvious ones where you mask the word and have some model predict the word. Just wondering if there's any other ways to do this.
I'm also interested in words that aren't grammatical synonyms but also slangs that could be synonyms.
For example, an apple in hockey slang means an assist, so if the sentence was ", Jones got an assist last night", maybe instead of assist, something like ", Jones got an apple last night" would be predicted in the context.
One idea I had was to get a specific embedding set for each context, but I feel like that's definitely not the solution. I hope my intent here is clear, please let me know if there are any ambiguities. Thanks in advance.