[PATCH] Re: [CWB] Setting name, language and.. info

Alberto Simões ambs at di.uminho.pt
Tue Apr 6 22:12:50 CEST 2010


Yep.
Digged the code.
Patch fixes it.

Cheers
Alberto

On 06/04/2010 19:45, Alberto Simões wrote:
> Hey
> 
> Found cwb-regedit.
> Unfortunately it doesn't seem to work (or I do not know how to do it):
> 
> [ambs at rachmaninoff svn]$ cwb-regedit EPPTEN_SOURCE :name "EuroParl v3"
> [ambs at rachmaninoff svn]$ cwb-regedit EPPTEN_SOURCE :name
> 
> [ambs at rachmaninoff svn]$
> 
> The same happens for the language, for instance:
> 
> [ambs at rachmaninoff svn]$ cwb-regedit EPPTEN_SOURCE :prop language PT
> 
> [ambs at rachmaninoff svn]$ cwb-regedit EPPTEN_SOURCE :prop language
> ??
> [ambs at rachmaninoff svn]$
> 
> 
> Should I start digging the code? :D
> Hug
> 
> On 06/04/2010 19:16, Alberto Simões wrote:
>> Hello
>>
>> Is there any expedite way to set a corpus language, its name and,
>> probably, some info details?
>>
>> That is, I would love if they (at least the first two) could be supplied
>> as command parameters for 'cwb-encode'.
>>
>> Not being the case, it would be nice to have any standard way to
>> set/read them.
>>
>> Is there anything like that, or should I just stick to perl
>> CWB::Registry? :)
>>
>> Thank you
>>
> 

-- 
Alberto Simões
-------------- next part --------------
Index: script/cwb-regedit
===================================================================
--- script/cwb-regedit	(revision 147)
+++ script/cwb-regedit	(working copy)
@@ -95,6 +95,7 @@
       $reg->home($v) if $cmd eq "home";
       $reg->name($v) if $cmd eq "name";
       $reg->info($v) if $cmd eq "ifile";
+      $CHANGES++;
     }
     else {
       print $reg->id if $cmd eq "id";
@@ -112,6 +113,7 @@
     my $p = shift @ARGS;
     if (@ARGS) {
       $reg->property($p, shift @ARGS);
+      $CHANGES++;
     }
     else {
       my $value = $reg->property($p);



More information about the CWB mailing list