Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformation algorithm proposal, FST2 to JSON #4

Closed
ppKrauss opened this issue Jan 12, 2018 · 1 comment
Closed

Transformation algorithm proposal, FST2 to JSON #4

ppKrauss opened this issue Jan 12, 2018 · 1 comment

Comments

@ppKrauss
Copy link

"An .fst2 file is a text file that describes a set of graphs", Unitex-GramLab-3.1-usermanual-en, chapter 14.3.2, "Format .fst2".

Proposal

To transform (export) the .fst2 file into .fst2.json, with some enhancing semantic and a formal description with json-schema. Example:

{
  "graphs":{
     "NP":["1 1", "2 2", "-2 2", "3 3", "t", "f"],
     "Adj":["6 1","5 1","4 1","t","f"]
  }, 
  "etc":["%<E>","%the/DET","%<A>/ADJ","%<N>","%nice","@pretty","%small","f"]
}

obtained from (original example of the chapter 14.3.2),

0000000002
-1 NP
: 1 1 
: 2 2 -2 2 
: 3 3 
t 
f 
-2 Adj
: 6 1 5 1 4 1 
t 
f 
%<E>
%the/DET
%<A>/ADJ
%<N>
%nice
@pretty
%small
f

The formal specification of the translation-algorithm (that can be translated to C++ for best implementation) can use Javascript, Perl or another simple language... Anyway there are some tips, or it can be inspired, by ElagFstFilesIO.cpp, ElagFstFilesIO.cpp, etc.

@martinec
Copy link
Member

It could be nice to have a tool to perform two-way translations of the .fst2 files to json. However, I doubt many users would be interested in this. In any way, If you want to contribute this feature, feel free to open a PR on the core repository. In the meantime, I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants