[Apertium-stuff] defining a pattern for parts of speech with certain tags

2012-04-11 Thread Alexandru Blanda
Hello,

I have encountered a problem while trying to define a rule for a part of
speech with certain tags. For example: romanian defined nouns such as
cățelul, băiatul, fata that should be translated in french by adding
an article: le chien, le garcon, la fille.
I have tried two approaches, but none of them seems to be working properly.
First, I tried to create a rule that matches all nouns, and verify which of
them has a tag equal to the def tag used to recognize defined nouns.

rule
   pattern
 pattern-item n=nom/
   /pattern
action
choose
  when
test
   equal
  clip pos=1 side=sl part=nounart/
  lit-tag v=def/
/equal
/test
  /when
/choose

I defined nounart as:

def-attr n=nounart
   attr-item tags=def/
   attr-item tags=ind/
/def-attr

However, this had as result adding articles to all nouns, and I tend to
believe this approach is useful only with the let tag, so you could
change a tag for the lexical item that will be output.(like in the example
here:
http://wiki.apertium.eu/index.php/Session_5:_Structural_transfer_basics#Describe_a_transfer_rule
)

The second attempt was defining:

def-cat n=defn
   cat-item tags=def.*/
   cat-item tags=def/
/def-cat

Also tried:

def-cat n=defn
   cat-item tags=def.*/
   cat-item tags=def/
   cat-item tags=n/
/def-cat

And then having the rule:

rule
   pattern
 pattern-item n=defn/
   /pattern
action
 out
lu
lit v=artn/
lit-tag v=art/
 clip pos=1 side=tl part=gender/
   /lu
b/
   lu
 clip pos=1 side=tl part=lem/
 clip pos=1 side=tl part=a_nom/
 clip pos=1 side=tl part=gender/
 clip pos=1 side=tl part=nbr/
 lit-tag v=nom/
 lit-tag v=ind/
   /lu
 /out
   /action
/rule

This attempt was also unsuccessful.
Could you please help me out with this issue. Which approach would be
closer to the correct one, or what would be the way to go?

Thanks,
Alexandru Blanda
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Arink Verma
Thanks Jacob!

I know more refining is needed in rules.jar
The major problem is Type cast can not be done over the dynamically
loaded classes from external dex. We have to use the Standard Data
Structure to invoke rules method. Even though the the Classes are of
same struct and name, we cant cast them.

So I have to include some depended package in rules.jar

Our work will be easier, if there is a way to cast them. Else we have
to use an interference using standard data structure.



-
Arink Verma
Computer Science and Engineering
Indian Institute of Technology

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Stephen Tigner
Sorry for the delay in responding. ^^; I tried version 21 on the
Android emulator last night. Still needs a bit of refinement, but it
does work. I'll try and look at version 22 later today or tonight when
I get home from work. Other comments are in-line below.

On Wed, Apr 11, 2012 at 8:53 AM, Arink Verma arinkve...@iitrpr.ac.in wrote:
 Thanks Jacob!

 I know more refining is needed in rules.jar
 The major problem is Type cast can not be done over the dynamically
 loaded classes from external dex. We have to use the Standard Data
 Structure to invoke rules method. Even though the the Classes are of
 same struct and name, we cant cast them.
Question for you. When you say you can't cast them, how were you
trying to do that?
The reason why I ask is I see that generic ?, and was wondering if
you'd tried something like this:

final Classwhatever.class.name.is Eo_En_t1x =
classloader.loadClass(RulePackage+.+classT1x);

(I don't recall what the class name should be off the top of my head,
but that filler name will do for this example.)
I dunno if that'd work, as I haven't tried it myself, but it couldn't
hurt to try. ^_^

 So I have to include some depended package in rules.jar

 Our work will be easier, if there is a way to cast them. Else we have
 to use an interference using standard data structure.



 -
 Arink Verma
 Computer Science and Engineering
 Indian Institute of Technology

 --
 Better than sec? Nothing is better than sec when it comes to
 monitoring Big Data applications. Try Boundary one-second
 resolution app monitoring today. Free.
 http://p.sf.net/sfu/Boundary-dev2dev
 ___
 Apertium-stuff mailing list
 Apertium-stuff@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/apertium-stuff

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Arink Verma
Thanks Jacob!
rules.jar has been reduced!

zip on same url has been updated!
http://cloud.github.com/downloads/arinkverma/Apertiurm-Androind-app-devlopment/ApertiumCode22.zip

contains of rules.jar
---
arink@arink-PC:~/Desktop/dex2jar-0.0.9.8$ unzip -l rules_dex2jar.jar
Archive:  rules_dex2jar.jar
  Length  DateTimeName
-  -- -   
  468  2012-04-12 00:51   android/annotation/SuppressLint.class
  395  2012-04-12 00:51   android/annotation/TargetApi.class
  165  2012-04-12 00:51   in/arink/gsoc/pair/BuildConfig.class
  204  2012-04-12 00:51   in/arink/gsoc/pair/R$attr.class
  267  2012-04-12 00:51   in/arink/gsoc/pair/R$drawable.class
  256  2012-04-12 00:51   in/arink/gsoc/pair/R$layout.class
  289  2012-04-12 00:51   in/arink/gsoc/pair/R$string.class
  358  2012-04-12 00:51   in/arink/gsoc/pair/R.class
 2636  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_antaux_t2x.class
43120  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t1x.class
12991  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t2x.class
 2556  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t3x.class
- ---
63705 12 files

-
Arink Verma
Computer Science and Engineering
Indian Institute of Technology

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Arink Verma
-- Forwarded message --
From: Arink Verma arinkve...@gmail.com
Date: Thu, Apr 12, 2012 at 1:15 AM
Subject: Re: Help on GSoC Coding Challenge
To: apertium-stuff@lists.sourceforge.net


Thanks Jacob!
rules.jar has been reduced!

zip on same url has been updated!
http://cloud.github.com/downloads/arinkverma/Apertiurm-Androind-app-devlopment/ApertiumCode22.zip

contains of rules.jar
---
arink@arink-PC:~/Desktop/dex2jar-0.0.9.8$ unzip -l rules_dex2jar.jar
Archive:  rules_dex2jar.jar
 Length      Date    Time    Name
-  -- -   
     468  2012-04-12 00:51   android/annotation/SuppressLint.class
     395  2012-04-12 00:51   android/annotation/TargetApi.class
     165  2012-04-12 00:51   in/arink/gsoc/pair/BuildConfig.class
     204  2012-04-12 00:51   in/arink/gsoc/pair/R$attr.class
     267  2012-04-12 00:51   in/arink/gsoc/pair/R$drawable.class
     256  2012-04-12 00:51   in/arink/gsoc/pair/R$layout.class
     289  2012-04-12 00:51   in/arink/gsoc/pair/R$string.class
     358  2012-04-12 00:51   in/arink/gsoc/pair/R.class
    2636  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_antaux_t2x.class
   43120  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t1x.class
   12991  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t2x.class
    2556  2012-04-12 00:51   in/arink/rule/eo_en/eo_en_t3x.class
-                     ---
   63705                     12 files

-
Arink Verma
Computer Science and Engineering
Indian Institute of Technology

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Jacob Nordfalk
Sendt fra min Android
Den 11/04/2012 18.56 skrev Stephen Tigner stephen.tig...@gmail.com:

 Sorry for the delay in responding. ^^; I tried version 21 on the
 Android emulator last night. Still needs a bit of refinement, but it
 does work. I'll try and look at version 22 later today or tonight when
 I get home from work. Other comments are in-line below.

 On Wed, Apr 11, 2012 at 8:53 AM, Arink Verma arinkve...@iitrpr.ac.in
wrote:
  Thanks Jacob!
 
  I know more refining is needed in rules.jar
  The major problem is Type cast can not be done over the dynamically
  loaded classes from external dex. We have to use the Standard Data
  Structure to invoke rules method. Even though the the Classes are of
  same struct and name, we cant cast them.
 Question for you. When you say you can't cast them, how were you
 trying to do that?

The problem is that the class loaders are different.


 The reason why I ask is I see that generic ?,

This is not related to generics.
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff


Re: [Apertium-stuff] Help on GSoC Coding Challenge

2012-04-11 Thread Stephen Tigner
(Responses inline)

On Wed, Apr 11, 2012 at 2:53 PM, Jacob Nordfalk
jacob.nordf...@gmail.com wrote:
 Sendt fra min Android
 Den 11/04/2012 18.56 skrev Stephen Tigner stephen.tig...@gmail.com:



 Sorry for the delay in responding. ^^; I tried version 21 on the
 Android emulator last night. Still needs a bit of refinement, but it
 does work. I'll try and look at version 22 later today or tonight when
 I get home from work. Other comments are in-line below.

 On Wed, Apr 11, 2012 at 8:53 AM, Arink Verma arinkve...@iitrpr.ac.in
 wrote:
  Thanks Jacob!
 
  I know more refining is needed in rules.jar
  The major problem is Type cast can not be done over the dynamically
  loaded classes from external dex. We have to use the Standard Data
  Structure to invoke rules method. Even though the the Classes are of
  same struct and name, we cant cast them.
 Question for you. When you say you can't cast them, how were you
 trying to do that?

 The problem is that the class loaders are different.
Ah, okay. n.n


 The reason why I ask is I see that generic ?,

 This is not related to generics.
My bad, then. ^^; Thanks for the clarification.

 --
 Better than sec? Nothing is better than sec when it comes to
 monitoring Big Data applications. Try Boundary one-second
 resolution app monitoring today. Free.
 http://p.sf.net/sfu/Boundary-dev2dev
 ___
 Apertium-stuff mailing list
 Apertium-stuff@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/apertium-stuff


--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff