public static void writeTagDict(final Map<String,Collection<Category>> tagDict,final File file) throws FileNotFoundException, UnsupportedEncodingException {
  final PrintWriter writer=new PrintWriter(file,"UTF-8");
  for (  final java.util.Map.Entry<String,Collection<Category>> entry : tagDict.entrySet()) {
    writer.print(entry.getKey());
    for (    final Category c : entry.getValue()) {
      writer.print("\t" + c.toString());
    }
    writer.println();
  }
  writer.close();
}

public static void writeTagDict ( final Map < String , Collection < Category > > tagDict , final File file ) throws FileNotFoundException , UnsupportedEncodingException { final PrintWriter writer = new PrintWriter ( file , "UTF-8" ) ; for ( final java . util . Map . Entry < String , Collection < Category > > entry : tagDict . entrySet ( ) ) { writer . print ( entry . getKey ( ) ) ; for ( final Category c : entry . getValue ( ) ) { writer . print ( "\t" + c . toString ( ) ) ; } writer . println ( ) ; } writer . close ( ) ; }
saves a tag dictionary to the model folder
