Index: app/src/dgp/attr.pm
===================================================================
--- app/src/dgp/attr.pm	(revision 0214596e4d70b25df913a24f19d50cb0f1b4a69f)
+++ 	(revision )
@@ -1,133 +1,0 @@
-package attr;
-
-use locale;
-use strict;
-
-use Data::Dumper;
-
-our $pos_re    = qr/(?:[[:upper:]]+)/;
-our $attr_re   = qr/(?:[[:upper:]]+)/;
-our $val_re    = qr/(?:[[:lower:][:digit:]+?!*-]|<[^>\n]+>)/;
-our $av_re     = qr/(?:$attr_re$val_re+)/;
-our $avlist_re = qr/(?:$av_re+)/;
-our $cat_re    = qr/(?:$pos_re(?:\/$avlist_re)?)/;
-
-sub match(\@\@)
-{
-    my ($cat1,$avs1)= @{shift @_};
-    my ($cat2,$avs2)= @{shift @_};
-
-    if($cat1 ne $cat2 && $cat1 ne '*' && $cat2 ne '*')
-    {
-	return 0; 
-    }
-    else
-    {
-      ATTR:for my $attr (keys %$avs1)
-      {
-	  if(exists $avs2->{$attr})
-	  {
-	      for my $val (keys %{$avs1->{$attr}})
-	      {
-		  next ATTR if $avs2->{$attr}->{$val};
-	      }
-	      return 0;
-	      last ATTR;
-	  }
-      }
-    }
-
-    return 1;
-}
-
-sub agree(\@\@$)
-{
-    my $val1 = $_[0]->[1]->{$_[2]};
-    my $val2 = $_[1]->[1]->{$_[2]};
-
-    return 1 if !$val1 || !$val2;
-
-    for my $v (keys %$val1)
-    {
-	return 1 if exists $val2->{$v};
-    }
-    return 0;
-}
-
-# funkcja parse
-# arg:     deskrypcja
-# warto¶æ: referencja do tablicy [<cat>, <avs>],
-#          gdzie <avs> jest referencja do hasza, zawierajacego pary
-#          atrybut=>hasz warto¶ci (pary warto¶æ=>1), czyli np.
-
-#         [
-#           'ADJ',
-#           {
-#             'KOLEDZY' => {
-#                            '<alojzy>' => 1,
-#                            '<karol>' => 1,
-#                            '<jan>' => 1
-#                          },
-#             'C' => {
-#                      'p' => 1,
-#                      'a' => 1,
-#                      'i' => 1
-#                    },
-#             'N' => {
-#                      'p' => 1
-#                    }
-#           }
-#         ];
-
-sub parse ($)
-{
-    my ($dstr)=@_;
-    my $avs={};
-    my ($cat,$attrlist) = split '/', $dstr;
-  ATTR:
-#    while( $attrlist =~ /([[:upper:]]+)((?:[[:lower:][:digit:]+?!*-]|<[^>\n]+>)+)/g )
-    while( $attrlist =~ /($attr_re)($val_re+)/g )
-    {
-	my ($attrstr,$valstr)=($1,$2);
-	my %vals;
-	while($valstr =~ /$val_re/g)
-	{
-	    my $val = $&;
-	    next ATTR if $val eq '*';
-	    $val =~ s/^<([[:lower:]])>$/$1/;
-	    $vals{$val}=1;
-	}
-	
-	$avs->{$attrstr} = \%vals; # dlaczego to dziala? %vals jest lokalne
-    }
-    [$cat, $avs];
-}
-
-# funkcja unparse
-# arg:     jak warto¶æ parse
-# warto¶æ: deskrypcja - napis
-
-sub unparse (\@)
-{
-    my ($cat,$avs)= @{shift @_};
-    my $dstr=$cat;
-    my @attrs = keys %$avs;
-    if(@attrs)
-    {
-	$dstr .= '/';
-	for my $attr ( sort @attrs )
-	{
-	    $dstr .= $attr . (join '', sort keys %{$avs->{$attr}});
-	}
-    }
-    $dstr;
-}
-
-
-sub canonize ($)
-{
-    unparse @{parse @_[0]} ;
-}
-
-
-1;
Index: app/src/dgp/canonize
===================================================================
--- app/src/dgp/canonize	(revision 0214596e4d70b25df913a24f19d50cb0f1b4a69f)
+++ app/src/dgp/canonize	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -6,9 +6,11 @@
 #author:	Tomasz Obrebski
 
+use lib "/usr/local/lib/utt";
+use lib "ENV{HOME}/.local/lib/utt";
+
 use strict;
 use Getopt::Long;
 use attr;
-#use File::HomeDir;
-#use lib "$ENV{HOME}/.utt/lib/perl";
+
 
 my $help;
Index: app/src/dgp/dgc
===================================================================
--- app/src/dgp/dgc	(revision 12d8443b2c87b3744c2563b0c25c44f8350df006)
+++ app/src/dgp/dgc	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -7,10 +7,10 @@
 
 # wymaga niejawnie programu canonize!!!!
-#use lib "ENV{HOME}/.utt/lib/perl";
+use lib "/usr/local/lib/utt";
+use lib "ENV{HOME}/.local/lib/utt";
 
 use strict;
 use Getopt::Long;
 use Data::Dumper;
-
 use attr;
 use File::HomeDir;
Index: app/src/dgp/seg.rb
===================================================================
--- app/src/dgp/seg.rb	(revision ff0fc991d727551b858d38e744ef5e936f54278a)
+++ 	(revision )
@@ -1,31 +1,0 @@
-
-class Seg
-  
-  def initialize(s="")
-    @line=s
-    self
-  end
-
-  def to_s
-    @line.chomp
-  end
-
-  def set(s)
-    @line=s
-    self
-  end
-
-  def field(key)
-    if key.class==Fixnum
-      @line.split[key-1]
-    elsif key.class==String
-      @line =~ /\s#{key}:(\S+)/; $1
-    end
-  end
-  alias [] field
-
-  def fields
-    @line.split
-  end
-
-end
Index: app/src/dgp/tre.rb
===================================================================
--- app/src/dgp/tre.rb	(revision cfed5c16437f8fdaa6995493b975db89abf458c2)
+++ app/src/dgp/tre.rb	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -1,3 +1,3 @@
-#!/usr/bin/ruby
+#!/usr/bin/ruby -I /usr/local/lib/utt -I ~/.local/lib/utt
 
 require 'getoptlong'
@@ -61,5 +61,6 @@
 end
 
-load 'seg.rb'
+require File.expand_path(File.dirname(__FILE__) + "../lib/utt/seg.rb")
+#require 'seg.rb'
 
 $dgpsep=';'
Index: app/src/grp/grp
===================================================================
--- app/src/grp/grp	(revision f5d3b20097c280ad859675079ea5c7bc804b9815)
+++ app/src/grp/grp	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -14,5 +14,4 @@
 
 my $systemconfigfile="/usr/local/etc/utt/grp.conf";
-#my $userconfigfile="$ENV{'HOME'}/.utt/grp.conf";
 my $userconfigfile=home()."/.utt/grp.conf";
 
Index: app/src/mar/mar
===================================================================
--- app/src/mar/mar	(revision 756213194ab50cc6e0ef6edfb9065ff3219f5372)
+++ app/src/mar/mar	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -6,8 +6,11 @@
 #author:	Marcin Walas
 
-#this program tags the tokenized file with given tags 
+#this program tags the tokenized file with given tags
 #tags can be given in any order and configuration through the expression
 #which is one of the parametres of the script
 #contact: d287572@atos.wmid.amu.edu.pl, walasiek@gmail.com
+
+use lib "/usr/local/lib/utt";
+use lib "ENV{HOME}/.local/lib/utt";
 
 use strict;
Index: app/src/ser/ser
===================================================================
--- app/src/ser/ser	(revision f5d3b20097c280ad859675079ea5c7bc804b9815)
+++ app/src/ser/ser	(revision 6b3be72395bfc594673b8184d6a7624e3800b47d)
@@ -13,5 +13,4 @@
 my $LIB_DIR="/usr/local/lib/utt";
 my $systemconfigfile='/usr/local/etc/utt/ser.conf';
-#my $userconfigfile="$ENV{'HOME'}/.utt/ser.conf";
 my $userconfigfile=home()."/.utt/ser.conf";
 
