Stimulated by Joe Marino's Sanskrit 103 at UW in May 2024, TGs suddenly became useful!
You can now easily make multi-linear translation displays (as web page tables)

About Translation Graphs:	https://TomVeatch.com/tg

Download & Study Instructions   https://TomVeatch.com/tg/README
				(Samples included show all the HTML and PHP you need)

Download and unzip https://TomVeatch.com/tg/tg.tgz
For example these commands would do it in *nix:

% curl https://TomVeatch.com/tg/tg.tgz
% tar zxvf tg.tgz

tg.tgz contains
  README		This file
  sample.html		Simple sample HTML file
  sample.php		Sample PHP file that includes & uses tglib's frag2HtmlTable()
  tglib.php		The TG library, mainly for building aligned HTML tables
  			from fragments made up of tiers tagged with alignment boundaries.
  PH/index.php		An example: My class project on Pratyabhijna Hrdayam
  skt103/index.php	Another example: My 6 sentence story homework

(You may download each above file separately in any browser by adding
".txt" to the name of each file above.  .txt tells the server to not
use PHP on it, so you get the original actual form.)

In order to use this Translation Graph technology, follow this workflow:

How To:	 		To use Translation Graphs, follow this workflow:

 * Arrange to edit files on a web server (C:\ will do on Windows)
 * Make sure it handles PHP files (most web servers have that automatically)
 * Edit a web page, in a file with name ending in .php
 * Put tglib.php in the same folder.
 * I'll explain it by example. Into your .php file insert something like this:

 < ?php        
 $tL = "ABC";  // tier Labels, could be anything.  
 $nFrags = 2;  // one table per fragment.  Hence two tables of three tiers.
 include "tglib.php";

 $fr["A"][1] = ".A0 one .A1 two .A2 three .A3 fourteen     .A$";
 $fr["B"][1] = ".A0 w^n .A1 tuw .A2 thriy .A3 for .B1 tiyn .A$";
 $fr["C"][1] = ".A0  1  .A1  2  .A2   3   .A3  4  .B1 +10  .A$";

 $fr["A"][2] = ".A0 is   .A1 was    .A2 will .A3 won't       .A$";
 $fr["B"][2] = ".A0 esta .A1 estuve .A2 sera .A3 no .B1 sera .A$";
 $fr["C"][2] = ".A0 \"   .A1 \"     .A2 \"   .A3  \"         .A$";

 for ($i=1; $i<=$nFrags; $i++) {
   echo "Fragment $i \n";
   echo frag2HtmlTable($fr, $i, array("A", "B", "C"));
 }
 ? > 

The key idea is: boundaries. Like ".B1", these are text tags inserted
in-line with content and used for column alignment.  Copying a line or
tier for further editing automatically brings the previous tier's
boundaries along retaining order and content alignment. Just edit the
little bits: It's almost no work to build up a beautiful multilinear
analysis.

Boundaries contain: a period (i.e. "boundary"), 
a capital letter (identifying the source tier which defined the boundary, like S for Skt), and
a number (or "$" for "last").  

1) Start with ".A0 .. .A$", for example.
2) Copy the line to tier B, and change what you like, inserting .B1, etc. boundaries.
3) Copy and further analyse, inserting more breaks, or merging by deleting boundaries
   so you can show words, phrases, a sentence, which will again have only .A0 .. .A$
   as its boundaries.

PHP will run the tglib library and apply the frag2HtmlTable function
to your text data to make multi-linear translation displays.  Use any
tier labels you like (e.g., $tL = "ES" for English and Sanskrit, or
$tL = "NRIDCMPFX" for devaNagari, Roman, Inflection, Derivation,
grammatical enCodings, steMs, Phrases, Full translation, and eXtra
commentaries).

Please let me know of issues, bugs, suggestions, improvements.

Tom Veatch     tcveatch@gmail.com, 1-206-858-2633, TomVeatch.com 
</PRE>
