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 Wednesday, August 31, 2005 - Post #7999
Forum Expert

Forum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum Expert

Customers
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Friday, October 30, 2020
Posts: 84, Visits: 287
I found the newest generator easy to work with and have a skin in Swedish ALMOST ready to go.

Q: Where do I find (and edit) the texts (individuals/families) that appear after the counters of names in the index?

Anna

Edited: Monday, January 16, 2006 by Anna

Posted Wednesday, August 31, 2005 - Post #8002
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: Friday, February 3, 2023
Posts: 4,794, Visits: 22,573
Anna (8/31/2005)
Q: Where do I find (and edit) the texts (individuals/families) that appear after the counters of names in the index?

The report generator uses the method Dic.PlurialCount("Individual", cIndividuals) or Dic.PlurialCount("Family", cFamilies).  You need to translate the following tags in Dictionary.xml.  Use the attribute P= for the plurial form if different from the default plurial.

 <Picture T="Picture"/>
 <Family T="Family" P="Families"/>
 <Individual T="Individual"/>

Posted Wednesday, August 31, 2005 - Post #8005
Forum Expert

Forum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum ExpertForum Expert

Customers
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: Friday, October 30, 2020
Posts: 84, Visits: 287
Thank you for the prompt reply, and: Sorry, shouldn't have missed it.Blush

OK, now the Swedish skin works. I've inserted plurals for sons, daughters, siblings etc in the dict, and added the swedish possessive forms for nouns in lang.

Q:The phrase during (period) a's occupation was... did not work out in swedish. I wish to rearrange the order of the terms, resulting in: A worked as ..... during...

So, how do I change the format from the basik form A to the possessive form A's? I've searched for the string "PhOccupation in lang to find where tio make the substiute, but is is not in that file?

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: Friday, February 3, 2023
Posts: 4,794, Visits: 22,573
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.

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!

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 #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: Friday, February 3, 2023
Posts: 4,794, Visits: 22,573
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 #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 #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: Friday, February 3, 2023
Posts: 4,794, Visits: 22,573
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.

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"


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse