// See www.openfst.org for extensive documentation on this weighted // finite-state transducer library. // // This library implements an unrestricted Thompson/Pike UTF-8 parser and // serializer. UTF-8 is a restricted subset of this byte stream encoding. For // a description of the encoding details, see: // // http://en.wikipedia.org/wiki/UTF-8 #ifndef FST_ICU_H_ #define FST_ICU_H_ #include #include #include namespace fst { // Trivial function to copy bytestrings into vectors of labels, truncating // if necessary. It is possible to use this sensibly with as little as 8 bits // of Label precision. This returns `true` deterministically for compatibility. template bool ByteStringToLabels(const string &str, std::vector