private static List<SpecialTokens> specialTokensFrom(SpecialtokensConfig config) {
        List<SpecialTokens> specialTokensList = new ArrayList<>();
        for (Iterator<Tokenlist> i = config.tokenlist().iterator(); i.hasNext();) {
            Tokenlist tokenListConfig = i.next();

            List<SpecialTokens.Token> tokenList = new ArrayList<>();
            for (Iterator<Tokens> j = tokenListConfig.tokens().iterator(); j.hasNext();) {
                Tokens tokenConfig = j.next();
                tokenList.add(new SpecialTokens.Token(tokenConfig.token(), tokenConfig.replace()));
            }
            specialTokensList.add(new SpecialTokens(tokenListConfig.name(), tokenList));
        }
        return specialTokensList;
    }
Create a special token registry from a configuration object.
linguistics/src/main/java/com/yahoo/language/process/SpecialTokenRegistry.java