How Sklearn-crfsuit interpret text features
CRF models are not DL models, they use text features in the traditional way as categorical data (equivalent to one-hot-encoding). However they are different from other supervised ML methods because they exploit the sequential information of the text.
Typically the text sequence is represented word by word, and each word can have several additional &quot;features&quot; usually represented as columns. For example:
The     DET   the
dog     NOUN  dog
chases  VERB  chase
a       DET   a
cat     NOUN  cat

The real features used by the CRF are computed based on the rules defined before training the model. They can involve the position of the current word or any other position relative to the current one. The features are usually simple binary values, for examples &quot;doc[n-1][2] == 'DET'&quot; would represent the condition &quot;the previous word is a determiner&quot;: &quot;previous word&quot; is indicated as n-1 in the sequence, column 2 indicates the POS column. The exact syntax to specify the rules may differ with different CRF implementations but the principle is the same.