[LON-CAPA-cvs] cvs: modules /gerd/harvesting grep_topic_keywords.pl taxonomy.dat

www www at source.lon-capa.org
Mon Sep 12 11:14:33 EDT 2011


www		Mon Sep 12 15:14:33 2011 EDT

  Added files:                 
    /modules/gerd/harvesting	grep_topic_keywords.pl 

  Modified files:              
    /modules/gerd/harvesting	taxonomy.dat 
  Log:
  Get all keywords for a topic
  
  
Index: modules/gerd/harvesting/taxonomy.dat
diff -u modules/gerd/harvesting/taxonomy.dat:1.4 modules/gerd/harvesting/taxonomy.dat:1.5
--- modules/gerd/harvesting/taxonomy.dat:1.4	Sun Sep 11 01:10:28 2011
+++ modules/gerd/harvesting/taxonomy.dat	Mon Sep 12 15:14:33 2011
@@ -1,32 +1,35 @@
 physics:introduction:mathematics	vector,vectors,derivative,integral	energy,momentum,force,wave
 physics:introduction:units	unit,measurement,system	energy,momentum
 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:rotationalkinematics	rotation,turn,turning,angular,speed,velocity,acceleration,angle,angles,degree,degrees,radians,displacement,balance	work,force,torque,atom,quantum	
+physics:mechanics:lineardynamics	force,forces,free,diagram,acceleration,mass,newton,weight	torque,angle,angular,charge,magnetic,atom,quantum,work
+physics:mechanics:rotationaldynamics	torque,angular,acceleration,inertia,moment,rolling,rotate,rotation,rotating,rotational,torques	atom,quantum,momentum
 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
+physics:mechanics:oscillation	period,frequency,resonance,amplitude,harmonic,spring,oscillation,oscillations,vibration,vibrations	wavelength,current
+physics:mechanics:solidsfluids	archimedes,water,air,buoyant,buoyancy,float,floating,fluid,gas,liquid,bernoulli,floats,gravity,sink,sinks,sinking,flow,flows
 physics:mechanics:wave	period,frequency,wavelength,speed,node,antinode,nodes	sound,doppler
 physics:mechanics:sound	sound,frequency,wavelength,speed,doppler,pressure,air,hear,water,longitudinal	magnetic,electric,field
 physics:thermodynamics:temperature	temperature,kelvin,celsius,fahrenheit
 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:thermodynamics:heat	capacity,heat,combustion,specific,temperature
+physics:thermodynamics:gaslaws	energy,work,pressure,temperature,gas,ideal,gas,volume,atm
+physics:thermodynamics:processes	adiabatic,isobaric,isometric,process,carnot,isothermal,gas,cylinder,engine,diagram,processes,internal,energy,thermodynamics,exhaust,absorb,work,reservoir,heat,entropy
 physics:electromagnetism:electrostatics	electric,charge,coulomb,coulombs,field,charged,charges	magnet,capacitor
 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:electromagnetism:inductance	inductor,inductors,henry,magnetic,induction,inductance,coil,mutual,loop,emf,alternating
+physics:electromagnetism:dccircuits	current,battery,voltage,potential,voltage,resistor,resistance,ampere,resistor,conductor,conductivity,conductors	frequency,phase,resonance,rlc,impedance,ac
+physics:electromagnetism:accircuits	current,voltage,frequency,resonance,phase,ac,oscillator,inductor,inductance,resistor,alternating,resistance,capacitor,capacitance,impedance,rlc	pressure,sound,air,wave
+physics:electromagnetism:emwaves	emwave,emwaves,magnetic,electric,field,speed,wavelength,frequency,amplitude,color,spectrum,pressure,radiation,intensity,polarization,polarized	lens,interference,sound,air,emf,force,static
+physics:optics:mirrorslenses	light,lens,mirror,lenses,mirrors,converging,focal,concave,convex,virtual,ray,reflection,diffraction,reflected,focus,eye,magnifying,power,incident,incidence,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,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
+physics:modern:quantum	spin,quantum,level,energy,black,body,bohr,heisenberg,atom,atoms,electron,electrons,wave,state,states,uncertainty,spectrum,line,photon,emission,absorption,emitted	isotope,nuclear,neutron,neutrons,compound
+physics:modern:nuclear	nucleus,proton,neutron,decay,halflife,atoms,atomic,fission,fusion,decays,protons,neutrons,isotope,radioactive,beta,gamma,activity,nuclear,mass,radiation,activity,alpha
 chemistry:introduction:units	unit,measurement,mass,fahrenheit,celsius,kelvin,joule,rounding,significant
 chemistry:introduction:states			physics:thermodynamics:states
 chemistry:introduction:mixtures	substance,matter,pure,mixture,mixtures,homogenous,heterogenous

Index: modules/gerd/harvesting/grep_topic_keywords.pl
+++ modules/gerd/harvesting/grep_topic_keywords.pl
use strict;
my $mytop=shift;
my $threshold=shift;

my @topic=();
open(IN,"res_topics_from_courses.dat");
while (my $line=<IN>) {
   chomp($line);
   my ($idx,$top)=split(/\t/,$line);
   $topic[$idx]=$top;
}
close(IN);

my %keyw=();
open(IN,"keywords.dat");
while (my $line=<IN>) {
   chomp($line);
   my ($idx,$key)=split(/\t/,$line);
   unless ($topic[$idx] eq $mytop) { next; }
   $keyw{lc($key)}++;
}
close(IN);

foreach my $key (sort(keys(%keyw))) {
   if ($keyw{$key}>=$threshold) {
      print $key."\t".$keyw{$key}."\n";
   }
}




More information about the LON-CAPA-cvs mailing list