[LON-CAPA-cvs] cvs: modules /gerd/harvesting problem_taxonomy.pl seq_keywords.pl seq_taxonomy.pl taxonomy.dat

www www at source.lon-capa.org
Fri Sep 9 23:19:01 EDT 2011


www		Sat Sep 10 03:19:01 2011 EDT

  Modified files:              
    /modules/gerd/harvesting	problem_taxonomy.pl seq_keywords.pl 
                            	seq_taxonomy.pl taxonomy.dat 
  Log:
  Taxonomies
  
  
-------------- next part --------------
Index: modules/gerd/harvesting/problem_taxonomy.pl
diff -u modules/gerd/harvesting/problem_taxonomy.pl:1.1 modules/gerd/harvesting/problem_taxonomy.pl:1.2
--- modules/gerd/harvesting/problem_taxonomy.pl:1.1	Sat Sep 10 00:45:44 2011
+++ modules/gerd/harvesting/problem_taxonomy.pl	Sat Sep 10 03:19:01 2011
@@ -20,6 +20,26 @@
 }
 close(IN);
 
+# Debug/learning only
+my @urlkey=();
+
+open(IN,'resource.dat');
+while (my $line=<IN>) {
+   my @entries=split(/\t/,$line);
+   $entries[4]=~s/^\/res\/\w+\/\w+\///;
+   $entries[4]=~s/\.\w+$//;
+   my %poskeys=();
+   foreach my $poskey (split(/[^A-Za-z]+/,$entries[4])) {
+      if (length($poskey)>3) {
+         $poskeys{lc($poskey)}=1;
+      }
+   }
+   $urlkey[$entries[0]]=join(',',keys(%poskeys));
+
+}
+close(IN);
+
+
 my @keywords=();
 
 my $keystr='';
@@ -32,7 +52,7 @@
    if ($id!=$oid) {
       $keystr=~s/^\,//;
       $keywords[$oid]=$keystr;
-      $keystr='';
+      $keystr=$urlkey[$id];
    }
    $keystr.=','.lc($key);
 }
Index: modules/gerd/harvesting/seq_keywords.pl
diff -u modules/gerd/harvesting/seq_keywords.pl:1.1 modules/gerd/harvesting/seq_keywords.pl:1.2
--- modules/gerd/harvesting/seq_keywords.pl:1.1	Thu Sep  8 22:25:56 2011
+++ modules/gerd/harvesting/seq_keywords.pl	Sat Sep 10 03:19:01 2011
@@ -1,5 +1,23 @@
 use strict;
 
+my @urlkey=();
+
+open(IN,'resource.dat');
+while (my $line=<IN>) {
+   my @entries=split(/\t/,$line);
+   $entries[4]=~s/^\/res\/\w+\/\w+\///;
+   $entries[4]=~s/\.\w+$//;
+   my %poskeys=();
+   foreach my $poskey (split(/[^A-Za-z]+/,$entries[4])) {
+      if (length($poskey)>3) {
+         $poskeys{lc($poskey)}=1;
+      }
+   }
+   $urlkey[$entries[0]]=join(',',keys(%poskeys));
+
+}
+close(IN);
+
 my @keywords=();
 
 my $keystr='';
@@ -12,7 +30,7 @@
    if ($id!=$oid) {
       $keystr=~s/^\,//;
       $keywords[$oid]=$keystr;
-      $keystr='';
+      $keystr=$urlkey[$id];
    }
    $keystr.=','.lc($key);
 }
Index: modules/gerd/harvesting/seq_taxonomy.pl
diff -u modules/gerd/harvesting/seq_taxonomy.pl:1.2 modules/gerd/harvesting/seq_taxonomy.pl:1.3
--- modules/gerd/harvesting/seq_taxonomy.pl:1.2	Sat Sep 10 00:45:00 2011
+++ modules/gerd/harvesting/seq_taxonomy.pl	Sat Sep 10 03:19:01 2011
@@ -28,7 +28,7 @@
    chomp($line);
    my ($seq,$subs,$keys)=split(/\t/,$line);
 
-#   print "-------$subs $keys\n";
+   print "-------$subs $keys\n";
 
    my %keysw=();
    foreach my $keyc (split(/\,/,$keys)) {
Index: modules/gerd/harvesting/taxonomy.dat
diff -u modules/gerd/harvesting/taxonomy.dat:1.2 modules/gerd/harvesting/taxonomy.dat:1.3
--- modules/gerd/harvesting/taxonomy.dat:1.2	Sat Sep 10 00:45:00 2011
+++ modules/gerd/harvesting/taxonomy.dat	Sat Sep 10 03:19:01 2011
@@ -1,10 +1,10 @@
 physics:introduction:mathematics	vector,vectors,derivative,integral	energy,momentum,force,wave
 physics:introduction:units	unit,measurement,system	energy,momentum
-physics:mechanics:linearkinematics	speed,velocity,acceleration,distance,displacement,position	angular,angle,force,forces,friction,work,atom,quantum,momentum,inertia
-physics:mechanics:rotationalkinematics	angular,speed,velocity,acceleration,angle,angles,degree,degrees,radians,displacement	work,force,torque,atom,quantum	
+physics:mechanics:linearkinematics	motion,kinematics,speed,velocity,acceleration,distance,displacement,position	angular,angle,force,forces,friction,work,atom,quantum,momentum,inertia
+physics:mechanics:rotationalkinematics	rotation,turn,turning,angular,speed,velocity,acceleration,angle,angles,degree,degrees,radians,displacement	work,force,torque,atom,quantum	
 physics:mechanics:lineardynamics	force,forces,free,diagram,acceleration,mass,newton	torque,angle,angular,charge,magnetic,atom,quantum,work
 physics:mechanics:rotationaldynamics	torque,angular,acceleration,inertia,moment	atom,quantum,momentum
-physics:mechanics:linearmomentum	momentum,velocity,mass,collision,collisions,elastic,inelastic	angular,atom,quantum
+physics:mechanics:linearmomentum	momentum,velocity,mass,collision,collisions,elastic,inelastic,impulse	angular,atom,quantum,inertia,torque
 physics:mechanics:angularmomentum	momentum,velocity,angular,inertia,moment,torque	atom,quantum
 physics:mechanics:energy	energy,force,distance,work,potential,kinetic,gravitational,gravity	entropy,charge,atom,quantum,electric
 physics:mechanics:oscillation	period,frequency,resonance,amplitude,harmonic,spring	wavelength,current
@@ -14,18 +14,18 @@
 physics:thermodynamics:states	phase,temperature,liquid,gas,solid,presssure,triple,melt,melting,evaporate,evaporation
 physics:thermodynamics:gaslaws	energy,work,pressure,temperature,gas,ideal,entropy,gas,volume
 physics:electromagnetism:electrostatics	electric,charge,coulomb,coulombs,field,charged,charges	magnet,capacitor
-physics:electromagnetism:potentials	voltage,potential,field	current,ampere,amperes
-physics:electromagnetism:capacitance	capacitance,capacitor,charge,plate,farad
-physics:electromagnetism:magnetism	magnetic,current,ampere,amperes,field,magnet,solenoid,force	wave,quantum
-physics:electromagnetism:inductance	magnetic,induction,inductance,coil,mutual,loop,emf
-physics:electromagnetism:dccircuits	current,battery,voltage,potential,voltage,resistor,resistance,ampere,resistor	frequency,phase,resonance
-physics:electromagnetism:accircuits	current,voltage,frequency,resonance,phase,ac,oscillator,inductor,inductance,resistor,resistance,capacitor,capacitance	pressure,sound,air,wave
-physics:electromagnetism:emwaves	magnetic,electric,field,speed,wavelength,frequency,amplitude,color,pressure,radiation,intensity	lens,interference,sound,air,emf,force,static
-physics:optics:mirrorslenses	light,lens,mirror,lenses,mirrors,focal,concave,convex,virtual,ray,reflection,diffraction,focus,eye,magnifying,power,index,refraction,glass
-physics:optics:opticalinstruments	telescope,microscope,glasses,eyepiece,magnification
+physics:electromagnetism:potentials	voltage,potential,field	current,ampere,amperes,rlc
+physics:electromagnetism:capacitance	capacitance,capacitor,capacitors,charge,plate,farad,field,electric,charged,charging,discharging,plates,dielectric
+physics:electromagnetism:magnetism	tesla,magnetic,current,ampere,amperes,field,magnet,solenoid,force,permanent,iron,permeability,magnetize	wave,quantum
+physics:electromagnetism:inductance	inductor,inductors,henry,magnetic,induction,inductance,coil,mutual,loop,emf
+physics:electromagnetism:dccircuits	current,battery,voltage,potential,voltage,resistor,resistance,ampere,resistor	frequency,phase,resonance,rlc,impedance,ac
+physics:electromagnetism:accircuits	current,voltage,frequency,resonance,phase,ac,oscillator,inductor,inductance,resistor,resistance,capacitor,capacitance,impedance,rlc	pressure,sound,air,wave
+physics:electromagnetism:emwaves	emwave,emwaves,magnetic,electric,field,speed,wavelength,frequency,amplitude,color,pressure,radiation,intensity	lens,interference,sound,air,emf,force,static
+physics:optics:mirrorslenses	light,lens,mirror,lenses,mirrors,focal,concave,convex,virtual,ray,reflection,diffraction,focus,eye,magnifying,power,index,refraction,glass,inverted
+physics:optics:opticalinstruments	telescope,microscope,glasses,eyepiece,magnification,focus,light
 physics:optics:interference	slit,pattern,diffraction,interference,grating,maxima,slits,minima	quantum
 physics:modern:relativity	frame,relative,dilation,contraction,time,space,transform,light,observer,speed,relativity,invariant,invariance,momentum,energy	lens,lenses,diffraction,eye,focus,friction
-physics:modern:quantum	spin,quantum,level,energy,atom,atoms,electron,electrons,wave,state,states,line	isotope,nuclear,neutron,neutrons	compound
+physics:modern:quantum	spin,quantum,level,energy,atom,atoms,electron,electrons,wave,state,states,line,photon,emission	isotope,nuclear,neutron,neutrons,compound
 physics:modern:nuclear	nucleus,proton,neutron,decay,halflife,atoms,atomic,protons,neutrons,isotope,radioactive,beta,gamma,activity,nuclear,mass,radiation
 chemistry:introduction:units	unit,measurement,mass,fahrenheit,celsius,kelvin,joule,rounding,significant
 chemistry:introduction:states			physics:thermodynamics:states


More information about the LON-CAPA-cvs mailing list