public void addUrlFeatures(NutchDocument doc,String urlString){
  try {
    URL url=new URL(urlString);
    StringTokenizer names=new StringTokenizer(url.getPath(),"/-");
    if (names.hasMoreTokens())     names.nextToken();
    while (names.hasMoreTokens()) {
      String feature=names.nextToken();
      addFeature(doc,feature);
    }
  }
 catch (  MalformedURLException e) {
    if (LOG.isWarnEnabled()) {
      LOG.warn("CC: failed to parse url: " + urlString + " : "+ e);
    }
  }
}

public void addUrlFeatures ( NutchDocument doc , String urlString ) { try { URL url = new URL ( urlString ) ; StringTokenizer names = new StringTokenizer ( url . getPath ( ) , "/-" ) ; if ( names . hasMoreTokens ( ) ) names . nextToken ( ) ; while ( names . hasMoreTokens ( ) ) { String feature = names . nextToken ( ) ; addFeature ( doc , feature ) ; } } catch ( MalformedURLException e ) { if ( LOG . isWarnEnabled ( ) ) { LOG . warn ( "CC: failed to parse url: " + urlString + " : " + e ) ; } } }
add the features represented by a license url . urls are of the form " http : / / creativecommons . org / licenses / xx - xx / xx / xx " , where " xx " names a license feature .
