GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Translation of narrative phrases using pattern matching

Click to view RSS...
Author Advanced techniques to translate phrases into other languages using rules with pattern matching.
Posted Saturday, October 22, 2005 - Post #8932
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Monday, June 2, 2025
Posts: 4,886, Visits: 22,796
rboshuis (10/22/2005)
I needed to have both the singular as well as plural versions of <had>, I tried changing this to

<had T="had" P="hadden" />

This is an excellent suggestion.  Can you tell me a bit more how you need the plurial version of <had>?  Technically, you can use the LanguageDictionary.Plurial("had", 2) which will return "hadden".

Posted Friday, October 21, 2005 - Post #8931
Forum Guru

Forum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum GuruForum Guru

Customers
GenoPro version: 2.0.1.6

Last Login: Tuesday, November 10, 2015
Posts: 102, Visits: 499
When looking at the current dictionary, I see that there are already some big issues with it, which needs to be resolved quickly before it gets out of hand...

There is an inconsistency in using the singular/plural form. i.o.w. sometimes two different entries in the dictionary are used, for example:

    <Is T="is"/>
    <Was T="was"/>
    <Are T="are"/>
    <Were T="were"/>
    <Has T="has"/>
    <Had T="had" />
    <Have T="have"/>

Whereas on the other hand plural forms are sometimes handled within the same element, for example,

<SiblingHalf_ T="half-sibling of unknown gender" P="half-siblings of unknown gender" C1="a half-sibling of unknown gender" />

It would be good to see if we can use a single way in order to express singular and plural forms.

I needed to have both the singular as well as plural versions of <had>, I tried changing this to

<had T="had" P="hadden" />

which didn't work since the code in Lang.vbs was not written to handle plural forms of the dictionary.

rgds,

Ronald
 


Edited: Saturday, October 22, 2005 by rboshuis

Posted Friday, September 2, 2005 - Post #8066
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Monday, June 2, 2025
Posts: 4,886, Visits: 22,796
You are right, I need to include the gender (male or female).  We have the same problem in French.  My idea is to have a third [optional] parameter representing the gender male, female, or blank.  This method will be smart enough that if you pass an individual instead of "M" or "F", it will work too.
Posted Friday, September 2, 2005 - Post #8061
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Sunday, March 21, 2021
Posts: 716, Visits: 12,927
So far I have overcome the tranlation of "the" into German writing "der/die/das" or similar. Would it be possible to have like "P" for plural also "m" for male, "f" for female and "n" for neutral, selected in the dialog box for places.
Another one:
in english you say: she had.. or they had...,
in german it would be: sie hatte.... or sie hatten....

On the family page it says in english: They had one son, but in german it says Sie hatte einen Sohn, but it should be "Sie hatten einen Sohn"
Posted Wednesday, August 31, 2005 - Post #8013
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Monday, June 2, 2025
Posts: 4,886, Visits: 22,796
EndWith is definitely a must and the other criterias might be handy, too.

Technically, every rule could be described using the Pattern attribute, however it is simpler to read EndWith (or perhaps EndsWith) than reading a pattern with wildcards (* and ?).  Besides, a pattern requires more CPU processing (ie, slower) than a straight comparison.

Enjoy your time with your family... there is no rush.  I have plenty of work on my plate so this will give me a little break.  Besides, I need time to digest this information and think of how to implement the rules.

Rjn
Posted Wednesday, August 31, 2005 - Post #8012
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Customers
Translator
GenoPro version: 2.5.4.1

Last Login: Friday, May 10, 2013
Posts: 43, Visits: 238
Sounds good.
EndWith is definitely a must and the other criterias might be handy, too. I'll try to think of any situation that could require more.

(I'm sorry it may take quite a long time for me to react to anything this week because I'm at my parent's place running Win98 @ 200 MHz Pentium with 33k modem Smile ... I'll be better available next week)


Edited: Wednesday, August 31, 2005 by GenoProSupport
Posted Wednesday, August 31, 2005 - Post #8009
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Monday, June 2, 2025
Posts: 4,886, Visits: 22,796
Rjn
For example in Finnish there are several (14) *cases* how a noun is inflected in different situations.
Let's pick a noun like hat - hattu. Different *cases*: hattu, hatun, hatussa, hatusta, hattuun, hatulla, hatulta, hatulle, hatuksi, hattuna, hatutta, hattua...

A section describing the rules for possessive names would be a good solution.  In that section, you could write 14 rules for each of the 14 cases.

The question remains... What are the criterias for the rules?

EndWith - The noun ends with a given string.
Pattern - The noun matches the pattern.  For performance reasons, the pattern won't be a regular expression, but simple wildcards such as * and ?.  For instance, any noun starting with the letter "A" would have the pattern "A*" or any noun ending with "s" could have the pattern "*s".
EqualTo - The noun matches exactly the given string.  This would be good for a very specific exception.

Operations:
ReplaceWith - Replace the noun with a given string.
Append - Append a string to a given noun.

Anything else missing?

Rjn
Posted Wednesday, August 31, 2005 - Post #8008
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Customers
Translator
GenoPro version: 2.5.4.1

Last Login: Friday, May 10, 2013
Posts: 43, Visits: 238
First of all I'll thank Dan for pm's and emails. I feel very motivated in translating as well as generally helping to improve the new report generator.

I did some changes to the phrases, too, as the originals weren't very natural translated in Finnish. Especially phrases for Education and Occupation were difficult. In general I had to add additional full stops mostly because of lack of ways to inflect nouns in proper way, for example
"Perttu was born 1-2-2003 in Alavus" had to be divided into two sentences because there was no way to inflect place name Alavus -> Alavudella, and I had to go around the problem by saying "Perttu was born 1-2-2003. Birth place was Alavus." so that I didn't need to inflect it.

I have discussed with Dan by email about some grammatical issues that are necessary especially for languages not so closely related to English.
For example in Finnish there are several (14) *cases* how a noun is inflected in different situations.
Let's pick a noun like hat - hattu. Different *cases*: hattu, hatun, hatussa, hatusta, hattuun, hatulla, hatulta, hatulle, hatuksi, hattuna, hatutta, hattua... (I can't even remember all of them).
Most of them are not necessary in report generator but the nominative (hattu), genetive (hatun), and partitive (hattua) are the most important.
The rest are essive, translative, inessive, elative, illative, adessive, ablative, allative, abessive, komitative, and instruktive. (Don't ask me which is which, I don't remember BigGrinSmile

Personal Pronouns and their inflection in various cases would be needed, too.
Posted Wednesday, August 31, 2005 - Post #8007
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
Translator
GenoPro version: 3.1.0.1

Last Login: Friday, November 25, 2022
Posts: 334, Visits: 7,574
GenoProSupport
In the future, I am planning to improve the phrase generator to have a built-in possessive set of rules and a new tag syntax such as:

Report.WritePhrase "{p0,1}", "Dan", "car"

Such a phrase would produce the following output: "Dan's car".  In French, the code Report.WritePhrase "{p0,1}", "Dan", "auto" would produce "L'auto de Dan".

Using this new improvement, removing the possessive form would be as simple as changing {p0,1} to {0,1}.  I think this will simplify the translation - as there would be no need to modify the VBScript code.

What a great idea!!

This way I'm sure there won't be any code changes!

Posted Wednesday, August 31, 2005 - Post #8006
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Monday, June 2, 2025
Posts: 4,886, Visits: 22,796
Anna
how do I change the format from the basik form A to the possessive form A's? I've searched for the string "PhOccupation" but is is not in that file?

The phrase PhOccupation is found in file individual.htm.  If you want to remove the possessive form, replace the line strRelative = StrPossessiveProperNoun(i.Name.Short) by strRelative = i.Name.Short.

In the future, I am planning to improve the phrase generator to have a built-in possessive set of rules and a new tag syntax such as:

Report.WritePhrase "{p0,1}", "Dan", "car"

Such a phrase would produce the following output: "Dan's car".  In French, the code Report.WritePhrase "{p0,1}", "Dan", "auto" would produce "L'auto de Dan".

Using this new improvement, removing the possessive form would be as simple as changing {p0,1} to {0,1}.  I think this will simplify the translation - as there would be no need to modify the VBScript code.




Reading This Topic

Expand / Collapse
Active: 2 - 1 guest, 0 members, 0 anonymous.
Refresh
No members currently viewing this topic!