0
$\begingroup$

I have different sets of strings, where I assume that each set follows some rules or patterns. For example, the first character must be a number, or the 3rd and the last characters must be the same, etc.

I want to be able to determine, given a string, what is the probability that it belongs to a specific set.

Are there any techniques from NLP that might help me do that? for example if I look at the similar problem of assigning a probability of some unknown word to be a part of a language given its characters? is there a common method to do that?

Thank you.

$\endgroup$
0
$\begingroup$

Why not just train any straightforward sequence classification model?

You could also slightly tweak your favorite language model to model $p(x|c)$, where $c$ is the the category / set. Then $p(c|x) \propto p(x|c)p(c)$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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