Difference between revisions of "User:Kanmuri/Notes/Java Runtime Port/Interchunk vs Transfer"
(added apertium_transfer vs ApertiumTransfer) |
(added transfer vs interchunk and read() sections) |
||
Line 13: | Line 13: | ||
Transfer and interchunk take different parameters for their read functions. Transfer takes a transfer file, a data file, and an fst file. Interchunk takes just a transfer file and a data file. |
Transfer and interchunk take different parameters for their read functions. Transfer takes a transfer file, a data file, and an fst file. Interchunk takes just a transfer file and a data file. |
||
Transfer and |
Transfer and interchunk then call their <code>transfer()</code> and <code>interchunk()</code> functions respectively. |
||
==apertium_transfer vs ApertiumTransfer== |
==apertium_transfer vs ApertiumTransfer== |
||
Not a significant difference between these two. The basic premise is the same, parse command-line options and parameters, then call the <code>read()</code> and <code>transfer()</code> functions. |
Not a significant difference between these two. The basic premise is the same, parse command-line options and parameters, then call the <code>read()</code> and <code>transfer()</code> functions. |
||
==transfer vs interchunk== |
|||
===<code>read()</code>=== |
|||
<code>void Transfer::read(string const &transferfile, string const &datafile, string const &fstfile)</code> |
|||
<code>void Interchunk::read(string const &transferfile, string const &datafile)</code> |
|||
The <code>read()</code> functions first call <code>readTransfer()</code> and <code>readInterchunk()</code> respectively. They then both try and open the specified data file. After that, <code>Transfer::read()</code> also calls a function to read the fst file, called <code>readBil()</code>. <code>Interchunk::read()</code> does not have that call, and that function (<code>readBil()</code>) does not exist in interchunk. |
Revision as of 10:08, 24 July 2010
I created this page to hold my notes as I go along trying to figure this out.
I wouldn't count on them being entirely correct, in fact they may be downright completely wrong in places, but hopefully not. ;) This is mainly just to have a place to organize my thoughts.
Contents
apertium_transfer vs apertium_interchunk
We are only really concerned with one function in these two files at the moment, main()
.
There's the obvious differences in the option parsing code, as interchunk doesn't have as many options as transfer does.
Transfer calls its read()
function differently depending on the command-line options and parameters.
Interchunk instead just assigns values to variables differently depending on the options and parameters, and then uses those to call its read()
function.
Transfer and interchunk take different parameters for their read functions. Transfer takes a transfer file, a data file, and an fst file. Interchunk takes just a transfer file and a data file.
Transfer and interchunk then call their transfer()
and interchunk()
functions respectively.
apertium_transfer vs ApertiumTransfer
Not a significant difference between these two. The basic premise is the same, parse command-line options and parameters, then call the read()
and transfer()
functions.
transfer vs interchunk
read()
void Transfer::read(string const &transferfile, string const &datafile, string const &fstfile)
void Interchunk::read(string const &transferfile, string const &datafile)
The read()
functions first call readTransfer()
and readInterchunk()
respectively. They then both try and open the specified data file. After that, Transfer::read()
also calls a function to read the fst file, called readBil()
. Interchunk::read()
does not have that call, and that function (readBil()
) does not exist in interchunk.