File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/metho/67/c67-1017_metho.xml
Size: 9,517 bytes
Last Modified: 2025-10-06 14:11:07
<?xml version="1.0" standalone="yes"?> <Paper uid="C67-1017"> <Title>The Application of FORTRAN to Automatic Translation</Title> <Section position="3" start_page="5" end_page="8" type="metho"> <SectionTitle> 5075 CONTINUE </SectionTitle> <Paragraph position="0"> I is the number of arrays, each consisting of six locations, that contain the English words after the analysis process. IFFP has to look for the first non-blank, since the English equivalent of a Hebrew word may be a word group. For the same reason we have to start the search from the 56th character, going left. We add 1 to the result of the function, so that the English word (or word group) is stored ~ith an additional blank and the result (NA2) of the function ICSS may serve as a parameter of the same function in the next round. The IF-statement before 5070 is a safeguard against the English word being blank.</Paragraph> <Paragraph position="1"> 6.4. A subroutine changing the word order was added to the existing subroutines. Since in Hebrew the adjective always follows the noun it qualifies, we have to change the word order in English.</Paragraph> <Paragraph position="2"> Format: OALLADT(N) N is a positive integer indicating that the adjective is the Nth word in the sentence. It changes position (together with its grammar codes) with the (N-1)th word. This subroutine was entirely written in FORTRAN, without a~ing subroutines.</Paragraph> <Paragraph position="3"> 6.5. The following subroutine was written for the dictionarF lookup of the translation project. The words in the dictionary are alphabetically ordered, with the exception of the blank, that stands between R and S, because of the value of its binary equivalent.</Paragraph> <Paragraph position="4"> For this reason, the blank following the word in the text is added before the word is compared with the dictionary entries (HW).</Paragraph> <Paragraph position="5"> The following parameters are used by the subroutine: NA = The position of the first letter of the word in the text that is looked up in the dictionary.</Paragraph> <Paragraph position="7"> A special subroutine for comparing non-numerical machine-words is necessary for ignoring the sign-b~t. When we make a mathematical comparison between two machine-words (subtracting one word from the other) the first bit is interpreted as a sign (0 = + and 1 = -).</Paragraph> <Paragraph position="8"> This will give a wrong result when we compare a word starting with a letter between A and I with a word starting with a letter between J and Z, since the former have &quot;0&quot; in their first bit-position, while the latter have &quot;1&quot; In non-numerical data-processing we therefore have to regard the machine-word as an entity of six characters, where the first bit of the first character is part of the binary number representing the whole machine-word.</Paragraph> <Paragraph position="9"> Format: S = CPW0(WORD1,WORD2) f e machine-words at the two locations WORD1 and WORD2 are compared. - 1 if the contents of WORD1 is greater than the contents of WORD2, S = 0 if the two machine-words are equal, and S = -1 if the contents of WORD1 is smaller than the contents of WORD2.</Paragraph> <Paragraph position="10"> This routine differs from CPW0 in enabling us to define the number of characters (N) that we regard as the entity to be compared.</Paragraph> <Paragraph position="11"> Format: CPST(BLOCK1,NA1,BLOCK2,NA2,N) The result is similar to that of the comparison of two machinewords: S = 1 if the binary number representing the string in BLOCK1 (starting from NA1) is greater than the binary number representing the string in BLOCK2 (starting from NA2), S = 0 if the two strings are equal, and S = -1 if the binary number representing the string in BLOCK1 is smaller than the binary number representing the string in BLOCK2.</Paragraph> <Paragraph position="12"> We shall see an example of this subroutine in the dictionary lookup, section 6.5., where the words from the text will be compared to the words in the dictionary.</Paragraph> <Paragraph position="13"> 6.2. SHA2 (shift in array) This subroutine enables us to shift strings of variable length. Format: CALL SHA2 (BLOCK,NA,N,NSHIFT,IND) NSHIFT is the number of positions we want to shift a string of N characters, starting from the NAth character in the array BLOCK. NSHIFT may be a positive or a negative integer, depending on whether we want to shift to the right or to the left. IND = 1 if we want to fill the vacant positions by blanks and IND = 0 if we want to fill them by zeros. We saw two examples of this subroutine in section 4.1. Since we reserved six machine-words for one English word,</Paragraph> <Paragraph position="15"> 6.3. ICSS (compose strings) With the aid of this subroutine we may bring a string of variable (N) from one arra~ (BLOCKI) ~o another (BLOCK2), starting from any position in the two arrays (NAt and NA2).</Paragraph> <Paragraph position="16"> Format: J = ICSS(BLOCK1,NA1,N,BLOCK2,NA2): The result of this function will be J = NA2+N.</Paragraph> <Paragraph position="17"> This routine, combined with IFFP (section 5.1.), is very useful in bringing the processed English sentence,word for word, into the output area.</Paragraph> <Paragraph position="19"/> </Section> <Section position="4" start_page="8" end_page="8" type="metho"> <SectionTitle> 5075 CONTINUE </SectionTitle> <Paragraph position="0"> I is the number of arrays, each consisting of six locations, that contain the English words after the analysis process. IFFP has to look for the first non-blank, since the English equivalent of a Hebrew word may be a word group. For the same reason we have to start the search from the 56th character, going left. We add 1 to the result of the function, so that the English word (or word group) is stored @Ith an additional blank and the result (NA2) of the function ICSS may serve as a parameter of the same function in the next round. The IF-statement before 5070 is a safeguard against the English word being blank.</Paragraph> <Paragraph position="1"> 6.4. A subroutine chan~in~ the word order was added to the existing subroutines. Since in Hebrew the adjective always follows the noun it qualifies, we have to change the word order in English.</Paragraph> <Paragraph position="2"> Format: CALL ADT(N) N is a positive integer indicating that the adjective is the Nth word in the sentence. It changes position (together with its grammar codes) with the (N-1)th word. This subroutine was entirely written in FORTRAN, without a~+-ng subroutines.</Paragraph> <Paragraph position="3"> 6.5. The following subroutine was written for the dictionar~ lookup of the translation project. The words in the dlctio~ary are alphabetically ordered, with the exception of the blank, that stands between R and S, because of the value of its binary equivalent.</Paragraph> <Paragraph position="4"> For this reasen, the blank following the word in the text is added before the word is compared with the dictionary entries (HW).</Paragraph> <Paragraph position="5"> The following parameters are used by the subroutine: NA = The position of the first letter of the word in the text that is looked up in the dictionary.</Paragraph> <Paragraph position="7"> The following two constants are set up in the subroutine: N = the first power of 2 greater than M (in our case 1024)</Paragraph> <Paragraph position="9"/> </Section> <Section position="5" start_page="8" end_page="8" type="metho"> <SectionTitle> COMMON TEXT,HW,CODE,SCODE,EWD,ECODE,HC,HSC,EW,EC,TESTWD </SectionTitle> <Paragraph position="0"/> <Paragraph position="2"/> </Section> <Section position="6" start_page="8" end_page="8" type="metho"> <SectionTitle> 590 RETURN END </SectionTitle> <Paragraph position="0"> The lookup is done by the logarithmic method. We jump into the middle of the array reserved for the dictionary and exclude the lower half of the dictionary from further search if t~e textword is greater than the word of the dictionary that it was compared with, and exclude the upper half if the word was smaller than the word in the dictionary. This process of halving the searched area is repeated till either the word is found or J, which is decreased by one before each search, is equal to zero. That means, we meyer have to compare more than ten times to find a word in the dictionary or to know that it cannot be found. Statements 560 and 570 prevent us from searching in the area between M and N. When the word is found, the grammatical information from the dictionary and the English translation of the Hebrew word is delivered to. the main program and the first bit-position of TESTWD(1) is set &quot;1&quot;.</Paragraph> <Paragraph position="1"> If the word is not found in the dictionary, the program proceeds as follows. If the first letter is one of the possible Hebrew prefixes (found by ICPC), the word is looked ~p again, with Ehe first letter stripped and NZ diminished by one. The result of the function ICPC is used by a computed GOTO for a branching to that part of the program that will prepare the insertion of the definite article or the solution of the ambiguity of the preposition.</Paragraph> <Paragraph position="2"> If the first letter is none of the possible prefixes and the word is not found in the dictionary, the program will use the Hebrew original in the translationand print out a message that the word was not found.</Paragraph> </Section> class="xml-element"></Paper>