KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/mandarintools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/mandarintools/annotate2.html
<HTML>
<HEAD>
 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
 <META name="description" content="Annotate Chinese Text with pronunciation and English definitions">
 <META name="keywords" content="Chinese, perl, tools, GB, romanization, pinyin, annotate, English, learn, read, study, guide"> 

<TITLE>Chinese Annotation Tool</TITLE>

<SCRIPT LANGUAGE="JavaScript1.1">
<!--

function loadPref() 
{
var allcookies = document.cookie;

if (allcookies == "") return false;

var start = allcookies.indexOf("annotate=", 0);
if (start == -1) return false;
start += 9;
var end = allcookies.indexOf(';', start);
if (end == -1) end = allcookies.length;

var cookieval = allcookies.substring(start, end);

var a = cookieval.split('&'); // break into name/value pairs
var prefhash = new Object();
for (var i=0; i < a.length; i++) { 
  a[i] = a[i].split(':');
  prefhash[a[i][0]] = a[i][1];
}

document.annotate.atype.selectedIndex = prefhash["atype.selectedIndex"];
document.annotate.addtones.selectedIndex = prefhash["addtones.selectedIndex"];

document.forms[0].elements[0].focus();

return true;
}


function savePref() 
{
var cookieval = "";

cookieval = "atype.selectedIndex:" + document.annotate.atype.selectedIndex + '&';
cookieval += "addtones.selectedIndex:" + document.annotate.addtones.selectedIndex;


var cookie = 'annotate=' + cookieval;
var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000); // plus 28 days
cookie += "; expires=" + expiry.toGMTString();
cookie += "; path=/";
document.cookie = cookie;

}

 -->
</script>

</HEAD>
<BODY onLoad="loadPref();" onUnload="savePref();" BGCOLOR=LIGHTYELLOW>
<CENTER><H2>Chinese Annotation Tool</H2></CENTER>
<FORM name="annotate" METHOD=POST ACTION="http://www.mandarintools.com/cgi-bin/annotate_db.pl">
<CENTER>
<TEXTAREA NAME="ctext" ROWS=12 COLS=80 WRAP="physical">
</TEXTAREA><BR>
URL: <INPUT TYPE="text" name="url" size=80><br>
<!--
<strong>Words to Annotate:</strong> <BR>
<TEXTAREA NAME="words" ROWS=4 COLS = 80 WRAP="physical">
</TEXTAREA>
<BR>
-->
<INPUT TYPE=SUBMIT VALUE="Annotate!">
<SELECT NAME="atype">
<OPTION VALUE="segment">Segment Only
<OPTION VALUE="adddict">Add Dictionary Entries as footnotes
<OPTION SELECTED VALUE="js_adddict">Add Dictionary Entries at status line
<OPTION VALUE="popup">Add Dictionary Entries as pop-up windows
<OPTION VALUE="topinyin">Convert to Pinyin
<OPTION VALUE="addpinyin">Add Pinyin Next to Characters
<OPTION VALUE="addruby">Add Pinyin Above Characters (IE5 Only)
<!-- <OPTION VALUE="addmargin">Add Pinyin/Definitions in Right Margin -->
</SELECT>
<BR>
<!--
Characters are 
<SELECT NAME="chartype">
<OPTION VALUE="simp">Simplified
<OPTION VALUE="trad">Traditional
<OPTION VALUE="both">Both
</SELECT>
<BR>
-->
Show pinyin with
<SELECT NAME="addtones">
<OPTION VALUE="0">Tone Numbers (pin1 yin1)
<OPTION VALUE="1">Tone Marks (p&#x012b;n y&#x012b;n)
</SELECT>

</CENTER>
</FORM>
<HR width=800>
   This tool makes learning to read Chinese easier by automatically
marking up the words in a Chinese text with their
pronunciations and dictionary definitions.  You can type or paste in
GB-encoded text or the address of a Chinese web page.  You have
several choices of how the text will be annotated:

<OL>
 <LI><STRONG>Segment Only</STRONG>: In this option, the program will
add spaces between the words in the text.  No other information is
added.

<LI><STRONG>Add Dictionary Entries as footnotes</STRONG>: This option
is for users with older browsers that do not understand JavaScript.
Holding the mouse over a word will do nothing, but clicking it on will
still take the user to the definition in the footnotes.  The file size
is also smaller than option 2.

 <LI><STRONG>Add Dictionary Entries at status line</STRONG>: After
segmenting the text, the program adds two kinds of ways of looking up
the word.  First, when the user puts the mouse over an underlined
word, its pronounciation and definition will appear at the bottom of
the browser, at the status line.  If the user actually clicks on the
underlined word, it will take them to the pronounciation and English
definition as a footnote later on in the page.

 <LI><STRONG>Add Dictionary Entries as pop-up windows</STRONG>: When
 the user puts the mouse over a Chinse word, the pinyin and English
 gloss appear in a pop-up window.


 <LI><STRONG>Convert to Pinyin</STRONG>: The program segments the text
and uses that information to convert the Chinese characters to pinyin.
Only the pinyin is shown in the results.

 <LI><STRONG>Add pinyin next to characters</StRONG>: The
pronounciation of each character is indicated by adding pinyin by its
side.  No other information is added.

 <LI><B>Add Pinyin above Characters</B>: Add the pinyin above the
character, in an annotation style called the ruby.  Currently only
works on Internet Explorer 5 (for other browsers the pinyin is placed
next to the character).

<!-- <LI><STRONG>Add Pinyin/Defs in Margins</STRONG>: Type a list of words
into "Words to Annotate" box, one word per line with no spaces.
Annotator will add definitions of these words to the right of the
paragraph the words occur in.  If the words are not in the dictionary,
you can also include the definition besides the word, using the format
described below. -->

</OL>
<P>
The user can add their own definition in this format:
<P>
Chinese [pinyin] /English definition/
<P>
That is, the Chinese (no internal spaces), followed by one space (not
a wide Chinese space), followed by the pinyin surrounded by square
brackets (with a space between each pinyin syllable), followed by
another space, followed the English definition/explanation surrounded
by slashes (this is the CEDict format).  One word or definition per
line.
<P>
   Users can use this to override the CEDict definitions in the other
modes if the definitions or romanizations have mistakes.
<P>
  When using "Add to Margins" the first time the word occurs it will
be in bold.  Its definition will appear more or less to its right.
Right now it is set up to try match words to paragraphs, so be sure to
have at least one blank line between paragraphs.

<P>
   Users can add words or definitions to the "Words to Annotate" section
to supplement or override the existing dictionary.  Use the CEDICT
format for entering entries.
<P>
   Click <A HREF="annotate_sample.html">here</A> for an already annotated sample text.
<P>
   The tool currently only handles GB-encoded text.  Dictionary
definitions are drawn from the <A HREF="http://www.mandarintools.com/cedict.html">
target="_top"> CEDICT</A> Chinese-English dictionary.  If you find a
word that does not have a definition, consider contributing it to the
CEDICT project.  The segmentation algorithm is still under
development.  Just what constitutes a "proper" Chinese word is also a
good research topic.  I will include my own guidelines at a later
date.  You can <A HREF="segmenter.html">download the segmenter
code</A> (in perl) and run it yourself.  You can also look up entries
in CEDICT from my <A HREF="worddict.html">Chinese-English
dictionary</A> page.
<P>
Please visit my <A HREF="contact.html">guestbook</A> to tell me you
comments and suggestions for this tool.  If you came to this page
directly, you might also enjoy visiting some of my other 
<A HREF="http://www.mandarintools.com" target="_top">On-line Chinese
Tools</A>.

</BODY>
</HTML>

Anon7 - 2021