I'm trying to read files in GFA format
and then parse into an openfst format
. In GFA format, each new line starts with a character that identifies what type of line it is. What I've done so far is if it starts with H
, it ignore the rest of the line and go the next one. If it starts with S
, it means it's a state, so it proceeds to identify each part of the line which consist of five strings including the S
. After this, I add a state, but I want my state to hold the value of one of the strings identified in the line, which is a numerical value
. As I understand, when you use an AddState, it return a Stateid which begins at zero, then increments by one. If it helps, I'm currently using a StdVectorFst object for the AddState function. I am reading about the SetState function
from the vector_fst_base_impl class
, would I be able to use this funcion to first get the StateId I want to change and then assign the new value? If so, would this cause any errors?
Thanks.
Aucun commentaire:
Enregistrer un commentaire