You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(14) |
Nov
(37) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(14) |
Feb
|
Mar
|
Apr
(15) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2003 |
Jan
(4) |
Feb
|
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2004 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
(4) |
Jun
(3) |
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(17) |
Nov
(3) |
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
(7) |
Apr
(17) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(20) |
Oct
|
Nov
(15) |
Dec
(2) |
2009 |
Jan
(38) |
Feb
(4) |
Mar
(20) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
(17) |
Sep
(26) |
Oct
|
Nov
(2) |
Dec
|
From: Thomas M. <tsm...@us...> - 2005-11-24 02:40:00
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2461/src/java/opennlp/maxent Modified Files: GISTrainer.java Log Message: fixed slack parameter option. Index: GISTrainer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISTrainer.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** GISTrainer.java 24 Oct 2005 12:29:01 -0000 1.18 --- GISTrainer.java 24 Nov 2005 02:39:47 -0000 1.19 *************** *** 1,4 **** ///////////////////////////////////////////////////////////////////////////// ! // Copyright (C) 2001 Jason Baldridge and Gann Bierner // // This library is free software; you can redistribute it and/or --- 1,4 ---- ///////////////////////////////////////////////////////////////////////////// ! // Copyright (C) 2001 Jason Baldridge and Gann Bierner and Tom Morton // // This library is free software; you can redistribute it and/or *************** *** 18,22 **** package opennlp.maxent; - import gnu.trove.*; /** --- 18,21 ---- *************** *** 26,30 **** --- 25,35 ---- * and is available at <a href ="ftp://ftp.cis.upenn.edu/pub/ircs/tr/97-08.ps.Z"><code>ftp://ftp.cis.upenn.edu/pub/ircs/tr/97-08.ps.Z</code></a>. * + * The slack parameter used in the above implementation has been removed by default + * from the computation per Investigating GIS and Smoothing for Maximum Entropy Taggers, Clark and Curran (2002). + * <a href="http://acl.ldc.upenn.edu/E/E03/E03-1071.pdf"><code>http://acl.ldc.upenn.edu/E/E03/E03-1071.pdf</code></a> + * The slack parameter can be used by setting _useSlackParameter to true. + * * @author Jason Baldridge + * @author Tom Morton * @version $Revision$, $Date$ */ *************** *** 367,373 **** double SUM = 0.0; for (int oid = 0; oid < numOutcomes; oid++) { - outsums[oid] = Math.exp(outsums[oid]); if (_useSlackParameter) { ! outsums[oid] += ((1.0 - ((double) numfeats[oid] / constant)) * correctionParam); } SUM += outsums[oid]; --- 372,380 ---- double SUM = 0.0; for (int oid = 0; oid < numOutcomes; oid++) { if (_useSlackParameter) { ! outsums[oid] = Math.exp(outsums[oid]+((1.0 - ((double) numfeats[oid] / constant)) * correctionParam)); ! } ! else { ! outsums[oid] = Math.exp(outsums[oid]); } SUM += outsums[oid]; |
From: Thomas M. <tsm...@us...> - 2005-11-24 02:39:14
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2333/src/java/opennlp/maxent Modified Files: GISModel.java Log Message: added main to help debug models. Index: GISModel.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISModel.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GISModel.java 6 Oct 2005 11:03:47 -0000 1.14 --- GISModel.java 24 Nov 2005 02:39:07 -0000 1.15 *************** *** 18,23 **** --- 18,27 ---- package opennlp.maxent; + import java.io.BufferedReader; + import java.io.File; + import java.io.InputStreamReader; import java.text.DecimalFormat; + /** * A maximum entropy model which has been trained using the Generalized *************** *** 260,262 **** --- 264,284 ---- return data; } + + public static void main(String[] args) throws java.io.IOException { + if (args.length == 0) { + System.err.println("Usage: GISModel modelname < contexts"); + System.exit(1); + } + GISModel m = new opennlp.maxent.io.SuffixSensitiveGISModelReader(new File(args[0])).getModel(); + BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); + DecimalFormat df = new java.text.DecimalFormat(".###"); + for (String line = in.readLine(); line != null; line = in.readLine()) { + String[] context = line.split(" "); + double[] dist = m.eval(context); + for (int oi=0;oi<dist.length;oi++) { + System.out.print("["+m.getOutcome(oi)+" "+df.format(dist[oi])+"] "); + } + System.out.println(); + } + } } |
From: Thomas M. <tsm...@us...> - 2005-11-21 18:55:31
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8266/src/java/opennlp/maxent Modified Files: TwoPassDataIndexer.java Log Message: cleaned up imports. Index: TwoPassDataIndexer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/TwoPassDataIndexer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TwoPassDataIndexer.java 13 Oct 2005 18:20:56 -0000 1.4 --- TwoPassDataIndexer.java 21 Nov 2005 18:55:24 -0000 1.5 *************** *** 18,24 **** package opennlp.maxent; ! import java.io.BufferedReader; import java.io.File; - import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; --- 18,25 ---- package opennlp.maxent; ! import gnu.trove.TIntArrayList; ! import gnu.trove.TObjectIntHashMap; ! import java.io.File; import java.io.FileWriter; import java.io.IOException; *************** *** 27,33 **** import java.util.Arrays; import java.util.List; - import java.util.StringTokenizer; - - import gnu.trove.*; /** --- 28,31 ---- |
From: Thomas M. <tsm...@us...> - 2005-10-24 13:38:34
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24556/src/java/opennlp/maxent/io Added Files: ObjectGISModelReader.java ObjectGISModelWriter.java Log Message: added per user request to facilitate serialization. --- NEW FILE: ObjectGISModelReader.java --- /////////////////////////////////////////////////////////////////////////////// //Copyright (C) 2005 Julien Nioche // //This library is free software; you can redistribute it and/or //modify it under the terms of the GNU Lesser General Public //License as published by the Free Software Foundation; either //version 2.1 of the License, or (at your option) any later version. // //This library is distributed in the hope that it will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. // //You should have received a copy of the GNU Lesser General Public //License along with this program; if not, write to the Free Software //Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ////////////////////////////////////////////////////////////////////////////// package opennlp.maxent.io; import java.io.IOException; import java.io.ObjectInputStream; public class ObjectGISModelReader extends GISModelReader { protected ObjectInputStream input; /** * Constructor which directly instantiates the ObjectInputStream containing * the model contents. * * @param dis The DataInputStream containing the model information. */ public ObjectGISModelReader(ObjectInputStream dis) { super(); input = dis; } protected int readInt() throws IOException { return input.readInt(); } protected double readDouble() throws IOException { return input.readDouble(); } protected String readUTF() throws IOException { return input.readUTF(); } } --- NEW FILE: ObjectGISModelWriter.java --- /////////////////////////////////////////////////////////////////////////////// //Copyright (C) 2005 Julien Nioche // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ////////////////////////////////////////////////////////////////////////////// package opennlp.maxent.io; import java.io.IOException; import java.io.ObjectOutputStream; import opennlp.maxent.GISModel; public class ObjectGISModelWriter extends GISModelWriter { protected ObjectOutputStream output; /** * Constructor which takes a GISModel and a ObjectOutputStream and prepares * itself to write the model to that stream. * * @param model The GISModel which is to be persisted. * @param dos The stream which will be used to persist the model. */ public ObjectGISModelWriter(GISModel model, ObjectOutputStream dos) { super(model); output = dos; } protected void writeUTF(String s) throws IOException { output.writeUTF(s); } protected void writeInt(int i) throws IOException { output.writeInt(i); } protected void writeDouble(double d) throws IOException { output.writeDouble(d); } protected void close() throws IOException { output.flush(); output.close(); } } |
From: Thomas M. <tsm...@us...> - 2005-10-24 13:38:03
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24454/src/java/opennlp/maxent Modified Files: MutableContext.java Context.java FileEventStream.java Log Message: adde licience. Index: MutableContext.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/MutableContext.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MutableContext.java 6 Oct 2005 11:03:12 -0000 1.1 --- MutableContext.java 24 Oct 2005 13:37:54 -0000 1.2 *************** *** 1,2 **** --- 1,19 ---- + /////////////////////////////////////////////////////////////////////////////// + //Copyright (C) 2005 Thomas Morton + // + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU Lesser General Public + // License as published by the Free Software Foundation; either + // version 2.1 of the License, or (at your option) any later version. + // + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU Lesser General Public + // License along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ////////////////////////////////////////////////////////////////////////////// package opennlp.maxent; Index: Context.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/Context.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Context.java 6 Oct 2005 11:03:12 -0000 1.1 --- Context.java 24 Oct 2005 13:37:54 -0000 1.2 *************** *** 1,2 **** --- 1,19 ---- + /////////////////////////////////////////////////////////////////////////////// + //Copyright (C) 2005 Thomas Morton + // + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU Lesser General Public + // License as published by the Free Software Foundation; either + // version 2.1 of the License, or (at your option) any later version. + // + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU Lesser General Public + // License along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ////////////////////////////////////////////////////////////////////////////// package opennlp.maxent; Index: FileEventStream.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/FileEventStream.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FileEventStream.java 13 Oct 2005 19:48:04 -0000 1.2 --- FileEventStream.java 24 Oct 2005 13:37:54 -0000 1.3 *************** *** 1,2 **** --- 1,19 ---- + /////////////////////////////////////////////////////////////////////////////// + //Copyright (C) 2005 Thomas Morton + // + // This library is free software; you can redistribute it and/or + // modify it under the terms of the GNU Lesser General Public + // License as published by the Free Software Foundation; either + // version 2.1 of the License, or (at your option) any later version. + // + // This library is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + // + // You should have received a copy of the GNU Lesser General Public + // License along with this program; if not, write to the Free Software + // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + ////////////////////////////////////////////////////////////////////////////// package opennlp.maxent; |
From: Thomas M. <tsm...@us...> - 2005-10-24 12:29:32
|
Update of /cvsroot/maxent/maxent/samples/sports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6278/samples/sports Modified Files: CreateModel.java README Log Message: updated examples Index: CreateModel.java =================================================================== RCS file: /cvsroot/maxent/maxent/samples/sports/CreateModel.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CreateModel.java 7 Oct 2005 02:58:25 -0000 1.4 --- CreateModel.java 24 Oct 2005 12:29:20 -0000 1.5 *************** *** 54,58 **** new BasicEventStream(new PlainTextByLineDataStream(datafr)); GIS.SMOOTHING_OBSERVATION = SMOOTHING_OBSERVATION; ! GISModel model = GIS.trainModel(es,true); File outputFile = new File(modelFileName); --- 54,58 ---- new BasicEventStream(new PlainTextByLineDataStream(datafr)); GIS.SMOOTHING_OBSERVATION = SMOOTHING_OBSERVATION; ! GISModel model = GIS.trainModel(es,USE_SMOOTHING); File outputFile = new File(modelFileName); Index: README =================================================================== RCS file: /cvsroot/maxent/maxent/samples/sports/README,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README 7 Oct 2005 02:59:42 -0000 1.4 --- README 24 Oct 2005 12:29:20 -0000 1.5 *************** *** 52,65 **** or, with command line classpath: ! > java -cp .:../../lib/trove.jar:../../output/classes Predict football.test You'll get output such as the following: -------------------------------------------------- ! For context: Cloudy,Happy,Humid ! Outdoor[0.77126] Indoor[0.22873] ! For context: Rainy,Sad,Humid ! Outdoor[0.00193] Indoor[0.99806] -------------------------------------------------- --- 52,65 ---- or, with command line classpath: ! > java -cp .:../../lib/trove.jar:../../output/classes Predict gameLocation.test You'll get output such as the following: -------------------------------------------------- ! For context: Cloudy Happy Humid ! Outdoor[0.9255] Indoor[0.0745] ! For context: Rainy Dry ! Outdoor[0.0133] Indoor[0.9867] -------------------------------------------------- *************** *** 74,87 **** -------------------------------------------------- ! For context: home=man_united,Beckham=false,Scholes=true,Neville=true,Henry=false,Kanu=true,Parlour=false,Ferguson=confident,Wengler=confident,arsenal_won_previous,man_united_won_previous ! arsenal[0.29334] man_united[0.44398] tie[0.26267] ! For context: home=arsenal,Beckham=false,Scholes=true,Neville=true,Henry=true,Kanu=true,Parlour=false,Ferguson=tense,Wengler=tense,arsenal_lost_previous,man_united_won_previous ! arsenal[0.35432] man_united[0.24733] tie[0.39833] -------------------------------------------------- In the first case, ManU looks like the clear winner, but in the second ! it looks like it will be a tie, though Arsenal looks to have more of a ! chance at winning it than ManU. (For those who don't know, Beckham, Scholes, and Neville or ManU --- 74,87 ---- -------------------------------------------------- ! For context: home=arsenal Beckham=true Henry=false ! arsenal[0.3201] man_united[0.6343] tie[0.0456] ! For context: home=man_united Beckham=true Henry=true ! arsenal[0.1499] man_united[0.2060] tie[0.6441] -------------------------------------------------- In the first case, ManU looks like the clear winner, but in the second ! it looks like it will be a tie, though ManU looks to have more of a ! chance at winning it than Arsenal. (For those who don't know, Beckham, Scholes, and Neville or ManU |
From: Thomas M. <tsm...@us...> - 2005-10-24 12:29:15
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6235/src/java/opennlp/maxent Modified Files: GISTrainer.java Log Message: fix for training. Index: GISTrainer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISTrainer.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** GISTrainer.java 7 Oct 2005 02:58:02 -0000 1.17 --- GISTrainer.java 24 Oct 2005 12:29:01 -0000 1.18 *************** *** 259,263 **** observedExpects[PID] = new MutableContext(outcomePattern,new double[numActiveOutcomes]); for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! OID = activeOutcomes[aoi]; params[PID].setParameter(aoi, 0.0); modelExpects[PID].setParameter(aoi, 0.0); --- 259,263 ---- observedExpects[PID] = new MutableContext(outcomePattern,new double[numActiveOutcomes]); for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! OID = outcomePattern[aoi]; params[PID].setParameter(aoi, 0.0); modelExpects[PID].setParameter(aoi, 0.0); |
From: Thomas M. <tsm...@us...> - 2005-10-13 19:59:41
|
Update of /cvsroot/maxent/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14044 Modified Files: CHANGES Log Message: added change. Index: CHANGES =================================================================== RCS file: /cvsroot/maxent/maxent/CHANGES,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** CHANGES 7 Oct 2005 02:59:42 -0000 1.20 --- CHANGES 13 Oct 2005 19:59:23 -0000 1.21 *************** *** 1,7 **** 2.4.0 ----- ! Updated parameter datatype to re-use data structure storing which outcomes are found with that predicate/context in GISModel. (Per suggestion by Richard Northedge). ! Made changes to support above change in GISTrainer, GISModelReader, GISModelWriter, and OldFormatGISModelReader. Changed smoothing boolean to be parameter instead of static variable in GIS. --- 1,10 ---- 2.4.0 ----- ! Updated parameter datatype to re-use data structure storing which outcomes ! are found with that predicate/context in GISModel. (Per suggestion by ! Richard Northedge). ! Made changes to support above change in GISTrainer, GISModelReader, ! GISModelWriter, and OldFormatGISModelReader. Changed smoothing boolean to be parameter instead of static variable in GIS. *************** *** 9,12 **** --- 12,17 ---- Update sample code to reflect above change. + Extracted FileEventStream from TwoPassDataIndexer. + Improved javadoc. |
From: Thomas M. <tsm...@us...> - 2005-10-13 19:48:12
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12884/src/java/opennlp/maxent Modified Files: FileEventStream.java Log Message: fixed typo Index: FileEventStream.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/FileEventStream.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FileEventStream.java 13 Oct 2005 18:20:56 -0000 1.1 --- FileEventStream.java 13 Oct 2005 19:48:04 -0000 1.2 *************** *** 77,81 **** /** * Trains and writes a model based on the events in the specified event file. ! * the name of teh model created is based on the event file name. * @param args eventfile [iterations cuttoff] * @throws IOException when the eventfile can not be read or the model file can not be written. --- 77,81 ---- /** * Trains and writes a model based on the events in the specified event file. ! * the name of the model created is based on the event file name. * @param args eventfile [iterations cuttoff] * @throws IOException when the eventfile can not be read or the model file can not be written. |
From: Thomas M. <tsm...@us...> - 2005-10-13 18:21:23
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22167/src/java/opennlp/maxent Modified Files: GIS.java Log Message: added additional training interface. Index: GIS.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GIS.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** GIS.java 7 Oct 2005 02:57:29 -0000 1.6 --- GIS.java 13 Oct 2005 18:21:15 -0000 1.7 *************** *** 111,114 **** --- 111,126 ---- * @param iterations The number of GIS iterations to perform. * @param indexer The object which will be used for event compilation. + * @param smoothing Defines whether the created trainer will use smoothing while training the model. + * @return The newly trained model, which can be used immediately or saved + * to disk using an opennlp.maxent.io.GISModelWriter object. + */ + public static GISModel trainModel(int iterations, DataIndexer indexer, boolean smoothing) { + return trainModel(iterations,indexer,false,smoothing); + } + + /** + * Train a model using the GIS algorithm. + * @param iterations The number of GIS iterations to perform. + * @param indexer The object which will be used for event compilation. * @param printMessagesWhileTraining Determines whether training status messages are written to STDOUT. * @param smoothing Defines whether the created trainer will use smoothing while training the model. *************** *** 123,126 **** --- 135,145 ---- } + /** + * Train a model using the GIS algorithm. + * @param iterations The number of GIS iterations to perform. + * @param indexer The object which will be used for event compilation. + * @return The newly trained model, which can be used immediately or saved + * to disk using an opennlp.maxent.io.GISModelWriter object. + */ public static GISModel trainModel(int iterations, DataIndexer indexer) { return trainModel(iterations,indexer,true,false); |
From: Thomas M. <tsm...@us...> - 2005-10-13 18:21:05
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22067/src/java/opennlp/maxent Modified Files: TwoPassDataIndexer.java Added Files: FileEventStream.java Log Message: removed inner class and made it its own class. --- NEW FILE: FileEventStream.java --- package opennlp.maxent; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.StringTokenizer; import opennlp.maxent.io.SuffixSensitiveGISModelWriter; /** * Class for using a file of events as an event stream. The format of the file is one event perline with * each line consisting of outcome followed by contexts (space delimited). * @author Tom Morton * */ public class FileEventStream implements EventStream { BufferedReader reader; String line; /** * Creates a new file event stream from the specified file name. * @param fileName the name fo the file containing the events. * @throws IOException When the specified file can not be read. */ public FileEventStream(String fileName) throws IOException { reader = new BufferedReader(new FileReader(fileName)); } /** * Creates a new file event stream from the specified file. * @param file the file containing the events. * @throws IOException When the specified file can not be read. */ public FileEventStream(File file) throws IOException { reader = new BufferedReader(new FileReader(file)); } public boolean hasNext() { try { return (null != (line = reader.readLine())); } catch (IOException e) { System.err.println(e); return (false); } } public Event nextEvent() { StringTokenizer st = new StringTokenizer(line); String outcome = st.nextToken(); int count = st.countTokens(); String[] context = new String[count]; for (int ci = 0; ci < count; ci++) { context[ci] = st.nextToken(); } return (new Event(outcome, context)); } /** * Generates a string representing the specified event. * @param event The event for which a string representation is needed. * @return A string representing the specified event. */ public static String toLine(Event event) { StringBuffer sb = new StringBuffer(); sb.append(event.getOutcome()); String[] context = event.getContext(); for (int ci=0,cl=context.length;ci<cl;ci++) { sb.append(" "+context[ci]); } sb.append(System.getProperty("line.separator")); return sb.toString(); } /** * Trains and writes a model based on the events in the specified event file. * the name of teh model created is based on the event file name. * @param args eventfile [iterations cuttoff] * @throws IOException when the eventfile can not be read or the model file can not be written. */ public static void main(String[] args) throws IOException { if (args.length == 0) { System.err.println("Usage: FileEventStream eventfile [iterations cutoff]"); System.exit(1); } int ai=0; String eventFile = args[ai++]; EventStream es = new FileEventStream(eventFile); int iterations = 100; int cutoff = 5; if (ai < args.length) { iterations = Integer.parseInt(args[ai++]); cutoff = Integer.parseInt(args[ai++]); } GISModel model = GIS.trainModel(es,iterations,cutoff); new SuffixSensitiveGISModelWriter(model, new File(eventFile+".bin.gz")).persist(); } } Index: TwoPassDataIndexer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/TwoPassDataIndexer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TwoPassDataIndexer.java 29 Aug 2004 18:59:12 -0000 1.3 --- TwoPassDataIndexer.java 13 Oct 2005 18:20:56 -0000 1.4 *************** *** 175,221 **** } - class FileEventStream implements EventStream { - - BufferedReader reader; - String line; - - public FileEventStream(String fileName) throws IOException { - reader = new BufferedReader(new FileReader(fileName)); - } - - public FileEventStream(File file) throws IOException { - reader = new BufferedReader(new FileReader(file)); - } - - public boolean hasNext() { - try { - return (null != (line = reader.readLine())); - } - catch (IOException e) { - System.err.println(e); - return (false); - } - } - - public Event nextEvent() { - StringTokenizer st = new StringTokenizer(line); - String outcome = st.nextToken(); - int count = st.countTokens(); - String[] context = new String[count]; - for (int ci = 0; ci < count; ci++) { - context[ci] = st.nextToken(); - } - return (new Event(outcome, context)); - } - - public static String toLine(Event e) { - StringBuffer sb = new StringBuffer(); - sb.append(e.getOutcome()); - String[] context = e.getContext(); - for (int ci=0,cl=context.length;ci<cl;ci++) { - sb.append(" "+context[ci]); - } - sb.append(System.getProperty("line.separator")); - return sb.toString(); - } - } --- 175,176 ---- |
From: Thomas M. <tsm...@us...> - 2005-10-07 02:59:49
|
Update of /cvsroot/maxent/maxent/samples/sports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27698/samples/sports Modified Files: README Log Message: update to reflect new version Index: README =================================================================== RCS file: /cvsroot/maxent/maxent/samples/sports/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 6 Jan 2004 10:28:42 -0000 1.3 --- README 7 Oct 2005 02:59:42 -0000 1.4 *************** *** 1,4 **** This is a simple example of a use of maximum entropy and the OpenNLP ! Maxent toolkit. (It was designed to work with Maxent v1.2.2.) There are two example data sets provided, one for whether a game should be played indoors or outdoors and another for whether Arsenal or --- 1,4 ---- This is a simple example of a use of maximum entropy and the OpenNLP ! Maxent toolkit. (It was designed to work with Maxent v2.4.0.) There are two example data sets provided, one for whether a game should be played indoors or outdoors and another for whether Arsenal or *************** *** 31,35 **** number): ! > javac -classpath .:../../lib/trove.jar:../../output/maxent-2.1.1.jar *.java Now, build the models: --- 31,35 ---- number): ! > javac -classpath .:../../lib/trove.jar:../../output/maxent-2.4.0.jar *.java Now, build the models: *************** *** 119,123 **** https://sourceforge.net/forum/forum.php?forum_id=18384 ! or send mail to Jason Baldridge <jm...@co...>. Posting to the forum is preferable. --- 119,123 ---- https://sourceforge.net/forum/forum.php?forum_id=18384 ! or send mail to Tom Morton <tsm...@us...>. Posting to the forum is preferable. |
From: Thomas M. <tsm...@us...> - 2005-10-07 02:59:49
|
Update of /cvsroot/maxent/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27698 Modified Files: CHANGES Log Message: update to reflect new version Index: CHANGES =================================================================== RCS file: /cvsroot/maxent/maxent/CHANGES,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CHANGES 2 Feb 2004 19:43:08 -0000 1.19 --- CHANGES 7 Oct 2005 02:59:42 -0000 1.20 *************** *** 1,2 **** --- 1,19 ---- + 2.4.0 + ----- + Updated parameter datatype to re-use data structure storing which outcomes are found with that predicate/context in GISModel. (Per suggestion by Richard Northedge). + + Made changes to support above change in GISTrainer, GISModelReader, GISModelWriter, and OldFormatGISModelReader. + + Changed smoothing boolean to be parameter instead of static variable in GIS. + + Update sample code to reflect above change. + + Improved javadoc. + + 2.3.0 + ----- + Added and updated javadoc including package descriptions. + Made new trove type to improve efficiency. + 2.2.0 ----- |
From: Thomas M. <tsm...@us...> - 2005-10-07 02:58:33
|
Update of /cvsroot/maxent/maxent/samples/sports In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27471/samples/sports Modified Files: CreateModel.java Log Message: update to reflect smoothing changes Index: CreateModel.java =================================================================== RCS file: /cvsroot/maxent/maxent/samples/sports/CreateModel.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CreateModel.java 20 Nov 2001 17:07:16 -0000 1.3 --- CreateModel.java 7 Oct 2005 02:58:25 -0000 1.4 *************** *** 45,68 **** */ public static void main (String[] args) { ! String dataFileName = new String(args[0]); ! String modelFileName = ! dataFileName.substring(0,dataFileName.lastIndexOf('.')) ! + "Model.txt"; ! try { ! FileReader datafr = new FileReader(new File(dataFileName)); ! EventStream es = ! new BasicEventStream(new PlainTextByLineDataStream(datafr)); ! GIS.SMOOTHING = USE_SMOOTHING; ! GIS.SMOOTHING_OBSERVATION = SMOOTHING_OBSERVATION; ! GISModel model = GIS.trainModel(es); ! ! File outputFile = new File(modelFileName); ! GISModelWriter writer = ! new SuffixSensitiveGISModelWriter(model, outputFile); ! writer.persist(); ! } catch (Exception e) { ! System.out.print("Unable to create model due to exception: "); ! System.out.println(e); ! } } --- 45,67 ---- */ public static void main (String[] args) { ! String dataFileName = new String(args[0]); ! String modelFileName = ! dataFileName.substring(0,dataFileName.lastIndexOf('.')) ! + "Model.txt"; ! try { ! FileReader datafr = new FileReader(new File(dataFileName)); ! EventStream es = ! new BasicEventStream(new PlainTextByLineDataStream(datafr)); ! GIS.SMOOTHING_OBSERVATION = SMOOTHING_OBSERVATION; ! GISModel model = GIS.trainModel(es,true); ! ! File outputFile = new File(modelFileName); ! GISModelWriter writer = ! new SuffixSensitiveGISModelWriter(model, outputFile); ! writer.persist(); ! } catch (Exception e) { ! System.out.print("Unable to create model due to exception: "); ! System.out.println(e); ! } } |
From: Thomas M. <tsm...@us...> - 2005-10-07 02:58:10
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27424/src/java/opennlp/maxent Modified Files: GISTrainer.java Log Message: change initilazation for smoothing case Index: GISTrainer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISTrainer.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** GISTrainer.java 6 Oct 2005 11:03:46 -0000 1.16 --- GISTrainer.java 7 Oct 2005 02:58:02 -0000 1.17 *************** *** 225,239 **** observedExpects = new MutableContext[numPreds]; ! int[] activeOutcomes = new int[outcomes.length]; int[] outcomePattern; int numActiveOutcomes = 0; for (PID = 0; PID < numPreds; PID++) { - params[PID] = new MutableContext(outcomes,new double[outcomes.length]); - modelExpects[PID] = new MutableContext(outcomes,new double[outcomes.length]); - observedExpects[PID] = new MutableContext(outcomes,new double[outcomes.length]); numActiveOutcomes = 0; if (_simpleSmoothing) { numActiveOutcomes = numOutcomes; ! outcomePattern = outcomes; } else { //determine active outcomes --- 225,240 ---- observedExpects = new MutableContext[numPreds]; ! int[] activeOutcomes = new int[numOutcomes]; int[] outcomePattern; + int[] allOutcomesPattern= new int[numOutcomes]; + for (OID = 0; OID < numOutcomes; OID++) { + allOutcomesPattern[OID] = OID; + } int numActiveOutcomes = 0; for (PID = 0; PID < numPreds; PID++) { numActiveOutcomes = 0; if (_simpleSmoothing) { numActiveOutcomes = numOutcomes; ! outcomePattern = allOutcomesPattern; } else { //determine active outcomes *************** *** 244,250 **** } } ! outcomePattern = new int[numActiveOutcomes]; ! for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! outcomePattern[aoi] = activeOutcomes[aoi]; } } --- 245,256 ---- } } ! if (numActiveOutcomes == numOutcomes) { ! outcomePattern = allOutcomesPattern; ! } ! else { ! outcomePattern = new int[numActiveOutcomes]; ! for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! outcomePattern[aoi] = activeOutcomes[aoi]; ! } } } |
From: Thomas M. <tsm...@us...> - 2005-10-07 02:57:37
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27348/src/java/opennlp/maxent Modified Files: GIS.java Log Message: added extra function for new smoothing call method Index: GIS.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GIS.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GIS.java 6 Oct 2005 11:03:47 -0000 1.5 --- GIS.java 7 Oct 2005 02:57:29 -0000 1.6 *************** *** 49,54 **** */ public static GISModel trainModel(EventStream eventStream) { ! return trainModel(eventStream, 100, 0, false,PRINT_MESSAGES); } /** --- 49,69 ---- */ public static GISModel trainModel(EventStream eventStream) { ! return trainModel(eventStream, 100, 0, false, PRINT_MESSAGES); } + + /** + * Train a model using the GIS algorithm, assuming 100 iterations and no + * cutoff. + * + * @param eventStream The EventStream holding the data on which this model + * will be trained. + * @param smoothing Defines whether the created trainer will use smoothing + * while training the model. + * @return The newly trained model, which can be used immediately or saved + * to disk using an opennlp.maxent.io.GISModelWriter object. + */ + public static GISModel trainModel(EventStream eventStream, boolean smoothing) { + return trainModel(eventStream, 100, 0, smoothing,PRINT_MESSAGES); + } /** *************** *** 69,73 **** } ! /** * Train a model using the GIS algorithm. * @param eventStream The EventStream holding the data on which this model --- 84,88 ---- } ! /** * Train a model using the GIS algorithm. * @param eventStream The EventStream holding the data on which this model |
From: Thomas M. <tsm...@us...> - 2005-10-06 11:04:48
|
Update of /cvsroot/maxent/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20962 Modified Files: build.xml Log Message: update version number for upcomming release. Index: build.xml =================================================================== RCS file: /cvsroot/maxent/maxent/build.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** build.xml 29 Aug 2004 19:00:57 -0000 1.23 --- build.xml 6 Oct 2005 11:04:40 -0000 1.24 *************** *** 10,15 **** <property name="Name" value="Maxent" /> <property name="name" value="maxent" /> ! <property name="version" value="2.3.0" /> ! <property name="year" value="2004"/> <echo message="----------- ${Name} ${version} [${year}] ------------"/> --- 10,15 ---- <property name="Name" value="Maxent" /> <property name="name" value="maxent" /> ! <property name="version" value="2.4.0" /> ! <property name="year" value="2005"/> <echo message="----------- ${Name} ${version} [${year}] ------------"/> |
From: Thomas M. <tsm...@us...> - 2005-10-06 11:04:35
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20794/src/java/opennlp/maxent/io Modified Files: GISModelWriter.java GISModelReader.java OldFormatGISModelReader.java Log Message: Updated readers and writers to use new Context data structure. Index: GISModelWriter.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/io/GISModelWriter.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GISModelWriter.java 11 Jun 2004 20:51:36 -0000 1.5 --- GISModelWriter.java 6 Oct 2005 11:04:16 -0000 1.6 *************** *** 32,36 **** */ public abstract class GISModelWriter { ! protected TIntParamHashMap[] PARAMS; protected String[] OUTCOME_LABELS; protected int CORRECTION_CONSTANT; --- 32,36 ---- */ public abstract class GISModelWriter { ! protected Context[] PARAMS; protected String[] OUTCOME_LABELS; protected int CORRECTION_CONSTANT; *************** *** 39,58 **** public GISModelWriter (GISModel model) { ! ! Object[] data = model.getDataStructures(); ! ! PARAMS = (TIntParamHashMap[])data[0]; ! TObjectIntHashMap pmap = (TObjectIntHashMap)data[1]; ! OUTCOME_LABELS = (String[])data[2]; ! CORRECTION_CONSTANT = ((Integer)data[3]).intValue(); ! CORRECTION_PARAM = ((Double)data[4]).doubleValue(); ! ! PRED_LABELS = new String[pmap.size()]; ! pmap.forEachEntry(new TObjectIntProcedure() { ! public boolean execute (Object pred, int index) { ! PRED_LABELS[index] = (String)pred; ! return true; ! } ! }); } --- 39,58 ---- public GISModelWriter (GISModel model) { ! ! Object[] data = model.getDataStructures(); ! ! PARAMS = (Context[]) data[0]; ! TObjectIntHashMap pmap = (TObjectIntHashMap)data[1]; ! OUTCOME_LABELS = (String[])data[2]; ! CORRECTION_CONSTANT = ((Integer)data[3]).intValue(); ! CORRECTION_PARAM = ((Double)data[4]).doubleValue(); ! ! PRED_LABELS = new String[pmap.size()]; ! pmap.forEachEntry(new TObjectIntProcedure() { ! public boolean execute (Object pred, int index) { ! PRED_LABELS[index] = (String)pred; ! return true; ! } ! }); } *************** *** 124,146 **** int numParams = 0; for (int pid=0; pid<PARAMS.length; pid++) { ! int[] predkeys = PARAMS[pid].keys(); ! Arrays.sort(predkeys); ! int numActive = predkeys.length; numParams += numActive; ! int[] activeOCs = new int[numActive]; double[] activeParams = new double[numActive]; ! int id = 0; for (int i=0; i < predkeys.length; i++) { int oid = predkeys[i]; ! activeOCs[id] = oid; ! activeParams[id] = PARAMS[pid].get(oid); id++; } ! sortPreds[pid] = new ComparablePredicate(PRED_LABELS[pid], ! activeOCs, activeParams); } --- 124,147 ---- int numParams = 0; for (int pid=0; pid<PARAMS.length; pid++) { ! int[] predkeys = PARAMS[pid].getOutcomes(); ! //Arrays.sort(predkeys); int numActive = predkeys.length; + int[] activeOutcomes = predkeys; + double[] activeParams = PARAMS[pid].getParameters(); numParams += numActive; ! /* double[] activeParams = new double[numActive]; ! int id = 0; for (int i=0; i < predkeys.length; i++) { int oid = predkeys[i]; ! activeOutcomes[id] = oid; ! activeParams[id] = PARAMS[pid].getParams(oid); id++; } ! */ sortPreds[pid] = new ComparablePredicate(PRED_LABELS[pid], ! activeOutcomes, activeParams); } Index: GISModelReader.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/io/GISModelReader.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GISModelReader.java 11 Jun 2004 20:51:36 -0000 1.5 --- GISModelReader.java 6 Oct 2005 11:04:16 -0000 1.6 *************** *** 20,23 **** --- 20,24 ---- import java.util.StringTokenizer; + import opennlp.maxent.Context; import opennlp.maxent.GISModel; import opennlp.maxent.TIntParamHashMap; *************** *** 80,84 **** int[][] outcomePatterns = getOutcomePatterns(); String[] predLabels = getPredicates(); ! TIntParamHashMap[] params = getParameters(outcomePatterns); return new GISModel(params, --- 81,85 ---- int[][] outcomePatterns = getOutcomePatterns(); String[] predLabels = getPredicates(); ! Context[] params = getParameters(outcomePatterns); return new GISModel(params, *************** *** 135,156 **** } ! protected TIntParamHashMap[] getParameters (int[][] outcomePatterns) ! throws java.io.IOException { ! ! TIntParamHashMap[] params = new TIntParamHashMap[NUM_PREDS]; ! ! int pid=0; ! for (int i=0; i<outcomePatterns.length; i++) { ! for (int j=0; j<outcomePatterns[i][0]; j++) { ! params[pid] = new TIntParamHashMap(); ! for (int k=1; k<outcomePatterns[i].length; k++) { ! double d = readDouble(); ! params[pid].put(outcomePatterns[i][k], d); ! } ! params[pid].compact(); ! pid++; ! } } ! return params; } } --- 136,168 ---- } ! /** ! * Reads the parameters from a file and populates an array of context objects. ! * @param outcomePatterns The outcomes patterns for the model. The first index refers to which ! * outcome pattern (a set of outcomes that occurs with a context) is being specified. The ! * second index specifies the number of contexts which use this pattern at index 0, and the ! * index of each outcomes which make up this pattern in indicies 1-n. ! * @return An array of context objects. ! * @throws java.io.IOException when the model file does not match the outcome patterns or can not be read. ! */ ! protected Context[] getParameters (int[][] outcomePatterns) throws java.io.IOException { ! Context[] params = new Context[NUM_PREDS]; ! int pid=0; ! for (int i=0; i<outcomePatterns.length; i++) { ! //construct outcome pattern ! int[] outcomePattern = new int[outcomePatterns[i].length-1]; ! for (int k=1; k<outcomePatterns[i].length; k++) { ! outcomePattern[k-1] = outcomePatterns[i][k]; } ! //populate parameters for each context which uses this outcome pattern. ! for (int j=0; j<outcomePatterns[i][0]; j++) { ! double[] contextParameters = new double[outcomePatterns[i].length-1]; ! for (int k=1; k<outcomePatterns[i].length; k++) { ! contextParameters[k-1] = readDouble(); ! } ! params[pid] = new Context(outcomePattern,contextParameters); ! pid++; ! } ! } ! return params; } } Index: OldFormatGISModelReader.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/io/OldFormatGISModelReader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OldFormatGISModelReader.java 11 Jun 2004 20:51:36 -0000 1.3 --- OldFormatGISModelReader.java 6 Oct 2005 11:04:16 -0000 1.4 *************** *** 24,27 **** --- 24,28 ---- import java.util.zip.GZIPInputStream; + import opennlp.maxent.Context; import opennlp.maxent.TIntParamHashMap; *************** *** 49,73 **** } ! protected TIntParamHashMap[] getParameters (int[][] outcomePatterns) ! throws java.io.IOException { ! ! TIntParamHashMap[] params = new TIntParamHashMap[NUM_PREDS]; ! ! int pid=0; ! for (int i=0; i<outcomePatterns.length; i++) { ! for (int j=0; j<outcomePatterns[i][0]; j++) { ! params[pid] = new TIntParamHashMap(); ! for (int k=1; k<outcomePatterns[i].length; k++) { ! double d = paramsInput.readDouble(); ! params[pid].put(outcomePatterns[i][k], d); ! } ! params[pid].compact(); ! pid++; ! } } ! return params; } - /** * Convert a model created with Maxent 1.0 to a format used with --- 50,84 ---- } ! /** ! * Reads the parameters from a file and populates an array of context objects. ! * @param outcomePatterns The outcomes patterns for the model. The first index refers to which ! * outcome pattern (a set of outcomes that occurs with a context) is being specified. The ! * second index specifies the number of contexts which use this pattern at index 0, and the ! * index of each outcomes which make up this pattern in indicies 1-n. ! * @return An array of context objects. ! * @throws java.io.IOException when the model file does not match the outcome patterns or can not be read. ! */ ! protected Context[] getParameters (int[][] outcomePatterns) throws java.io.IOException { ! Context[] params = new Context[NUM_PREDS]; ! int pid=0; ! for (int i=0; i<outcomePatterns.length; i++) { ! //construct outcome pattern ! int[] outcomePattern = new int[outcomePatterns[i].length-1]; ! for (int k=1; k<outcomePatterns[i].length; k++) { ! outcomePattern[k-1] = outcomePatterns[i][k]; } ! //populate parameters for each context which uses this outcome pattern. ! for (int j=0; j<outcomePatterns[i][0]; j++) { ! double[] contextParameters = new double[outcomePatterns[i].length-1]; ! for (int k=1; k<outcomePatterns[i].length; k++) { ! contextParameters[k-1] = readDouble(); ! } ! params[pid] = new Context(outcomePattern,contextParameters); ! pid++; ! } ! } ! return params; } /** * Convert a model created with Maxent 1.0 to a format used with |
From: Thomas M. <tsm...@us...> - 2005-10-06 11:04:01
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20635/src/java/opennlp/maxent Modified Files: GISTrainer.java GISModel.java GIS.java Log Message: Updated model and trainer to use new Context data structure. Index: GISTrainer.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISTrainer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** GISTrainer.java 14 Jun 2004 20:52:41 -0000 1.15 --- GISTrainer.java 6 Oct 2005 11:03:46 -0000 1.16 *************** *** 51,55 **** private int numPreds; // # of predicates private int numOutcomes; // # of outcomes ! /** A global index variable for Tokens. */ private int TID; /** A global index variable for Predicates. */ --- 51,55 ---- private int numPreds; // # of predicates private int numOutcomes; // # of outcomes ! /** A global index variable for Events. */ private int TID; /** A global index variable for Predicates. */ *************** *** 83,93 **** /** Stores the observed expected values of the features based on training data. */ ! private TIntParamHashMap[] observedExpects; /** Stores the estimated parameter value of each predicate during iteration */ ! private TIntParamHashMap[] params; /** Stores the expected values of the features based on the current models */ ! private TIntParamHashMap[] modelExpects; --- 83,93 ---- /** Stores the observed expected values of the features based on training data. */ ! private MutableContext[] observedExpects; /** Stores the estimated parameter value of each predicate during iteration */ ! private MutableContext[] params; /** Stores the expected values of the features based on the current models */ ! private MutableContext[] modelExpects; *************** *** 113,167 **** /** Initial probability for all outcomes. */ double iprob; ! ! /** Make all values in an TIntDoubleHashMap return to 0. */ ! private TDoubleFunction backToZeros = new TDoubleFunction() { ! public double execute(double arg) { ! return 0.0; ! } ! }; ! ! /** Updates the extected values of the features based on the modelDistribution for this event values. */ ! private TIntDoubleProcedure updateModelExpect = new TIntDoubleProcedure() { ! public boolean execute(int oid, double arg) { ! modelExpects[PID].put(oid, arg + (modelDistribution[oid] * numTimesEventsSeen[TID])); ! return true; ! } ! }; ! ! /** Updates the params based on the newly computed model expected values. */ ! private TIntDoubleProcedure updateParams = new TIntDoubleProcedure() { ! public boolean execute(int oid, double arg) { ! params[PID].put(oid, arg + (Math.log(observedExpects[PID].get(oid)) - Math.log(modelExpects[PID].get(oid)))); ! return true; ! } ! }; ! ! private TIntDoubleProcedure updateParamsWithSmoothing = new TIntDoubleProcedure() { ! public boolean execute(int oid, double arg) { ! double x = 0.0; ! double x0 = 0.0; ! double tmp; ! double f; ! double fp; ! for (int i = 0; i < 50; i++) { ! // check what domain these parameters are in ! tmp = modelExpects[PID].get(oid) * Math.exp(constant * x0); ! f = tmp + (arg + x0) / sigma - observedExpects[PID].get(oid); ! fp = tmp * constant + 1 / sigma; ! if (fp == 0) { ! break; ! } ! x = x0 - f / fp; ! if (Math.abs(x - x0) < 0.000001) { ! x0 = x; ! break; ! } ! x0 = x; ! } ! params[PID].put(oid, arg + x0); ! return true; ! } ! }; ! /** * Creates a new <code>GISTrainer</code> instance which does --- 113,117 ---- /** Initial probability for all outcomes. */ double iprob; ! /** * Creates a new <code>GISTrainer</code> instance which does *************** *** 214,222 **** * Train a model using the GIS algorithm. * - * @param eventStream The EventStream holding the data on which this model - * will be trained. * @param iterations The number of GIS iterations to perform. - * @param cutoff The number of times a predicate must be seen in order - * to be relevant for training. * @param di The data indexer used to compress events in memory. * @return The newly trained model, which can be used immediately or saved --- 164,168 ---- *************** *** 275,313 **** // implementation, this is cancelled out when we compute the next // iteration of a parameter, making the extra divisions wasteful. ! params = new TIntParamHashMap[numPreds]; ! modelExpects = new TIntParamHashMap[numPreds]; ! observedExpects = new TIntParamHashMap[numPreds]; ! ! int initialCapacity; ! float loadFactor = (float) 0.9; ! if (numOutcomes < 3) { ! initialCapacity = 2; ! loadFactor = (float) 1.0; ! } ! else if (numOutcomes < 5) { ! initialCapacity = 2; ! } ! else { ! initialCapacity = (int) numOutcomes / 2; ! } for (PID = 0; PID < numPreds; PID++) { ! params[PID] = new TIntParamHashMap(initialCapacity, loadFactor); ! modelExpects[PID] = new TIntParamHashMap(initialCapacity, loadFactor); ! observedExpects[PID] = new TIntParamHashMap(initialCapacity, loadFactor); ! for (OID = 0; OID < numOutcomes; OID++) { if (predCount[PID][OID] > 0) { ! params[PID].put(OID, 0.0); ! modelExpects[PID].put(OID, 0.0); ! observedExpects[PID].put(OID, predCount[PID][OID]); } ! else if (_simpleSmoothing) { ! params[PID].put(OID, 0.0); ! modelExpects[PID].put(OID, 0.0); ! observedExpects[PID].put(OID,smoothingObservation); } } - params[PID].compact(); - modelExpects[PID].compact(); - observedExpects[PID].compact(); } --- 221,266 ---- // implementation, this is cancelled out when we compute the next // iteration of a parameter, making the extra divisions wasteful. ! params = new MutableContext[numPreds]; ! modelExpects = new MutableContext[numPreds]; ! observedExpects = new MutableContext[numPreds]; ! ! int[] activeOutcomes = new int[outcomes.length]; ! int[] outcomePattern; ! int numActiveOutcomes = 0; for (PID = 0; PID < numPreds; PID++) { ! params[PID] = new MutableContext(outcomes,new double[outcomes.length]); ! modelExpects[PID] = new MutableContext(outcomes,new double[outcomes.length]); ! observedExpects[PID] = new MutableContext(outcomes,new double[outcomes.length]); ! numActiveOutcomes = 0; ! if (_simpleSmoothing) { ! numActiveOutcomes = numOutcomes; ! outcomePattern = outcomes; ! } ! else { //determine active outcomes ! for (OID = 0; OID < numOutcomes; OID++) { ! if (predCount[PID][OID] > 0) { ! activeOutcomes[numActiveOutcomes] = OID; ! numActiveOutcomes++; ! } ! } ! outcomePattern = new int[numActiveOutcomes]; ! for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! outcomePattern[aoi] = activeOutcomes[aoi]; ! } ! } ! params[PID] = new MutableContext(outcomePattern,new double[numActiveOutcomes]); ! modelExpects[PID] = new MutableContext(outcomePattern,new double[numActiveOutcomes]); ! observedExpects[PID] = new MutableContext(outcomePattern,new double[numActiveOutcomes]); ! for (int aoi=0;aoi<numActiveOutcomes;aoi++) { ! OID = activeOutcomes[aoi]; ! params[PID].setParameter(aoi, 0.0); ! modelExpects[PID].setParameter(aoi, 0.0); if (predCount[PID][OID] > 0) { ! observedExpects[PID].setParameter(aoi, predCount[PID][OID]); } ! else if (_simpleSmoothing) { ! observedExpects[PID].setParameter(aoi,smoothingObservation); } } } *************** *** 318,322 **** for (int j = 0; j < contexts[TID].length; j++) { PID = contexts[TID][j]; ! if (!modelExpects[PID].containsKey(outcomes[TID])) { cfvalSum += numTimesEventsSeen[TID]; } --- 271,275 ---- for (int j = 0; j < contexts[TID].length; j++) { PID = contexts[TID][j]; ! if (!modelExpects[PID].contains(outcomes[TID])) { cfvalSum += numTimesEventsSeen[TID]; } *************** *** 382,395 **** /** ! * Use this model to evaluate a context and return an array of the * likelihood of each outcome given that context. * * @param context The integers of the predicates which have been * observed at the present decision point. - * @return The normalized probabilities for the outcomes given the - * context. The indexes of the double[] are the outcome - * ids, and the actual string representation of the - * outcomes can be obtained from the method - * getOutcome(int i). */ public void eval(int[] context, double[] outsums) { --- 335,343 ---- /** ! * Use this model to evaluate a context and populate the specified outsums array with the * likelihood of each outcome given that context. * * @param context The integers of the predicates which have been * observed at the present decision point. */ public void eval(int[] context, double[] outsums) { *************** *** 399,409 **** } int[] activeOutcomes; for (int i = 0; i < context.length; i++) { ! TIntParamHashMap predParams = params[context[i]]; ! activeOutcomes = predParams.keys(); for (int j = 0; j < activeOutcomes.length; j++) { int oid = activeOutcomes[j]; numfeats[oid]++; ! outsums[oid] += constantInverse * predParams.get(oid); } } --- 347,359 ---- } int[] activeOutcomes; + double[] activeParameters; for (int i = 0; i < context.length; i++) { ! Context predParams = params[context[i]]; ! activeOutcomes = predParams.getOutcomes(); ! activeParameters = predParams.getParameters(); for (int j = 0; j < activeOutcomes.length; j++) { int oid = activeOutcomes[j]; numfeats[oid]++; ! outsums[oid] += constantInverse * activeParameters[j]; } } *************** *** 422,425 **** --- 372,377 ---- } + + /* Compute one iteration of GIS and retutn log-likelihood.*/ *************** *** 437,444 **** for (int j = 0; j < contexts[TID].length; j++) { PID = contexts[TID][j]; ! modelExpects[PID].forEachEntry(updateModelExpect); if (_useSlackParameter) { for (OID = 0; OID < numOutcomes; OID++) { ! if (!modelExpects[PID].containsKey(OID)) { CFMOD += modelDistribution[OID] * numTimesEventsSeen[TID]; } --- 389,400 ---- for (int j = 0; j < contexts[TID].length; j++) { PID = contexts[TID][j]; ! int[] activeOutcomes = modelExpects[PID].getOutcomes(); ! for (int aoi=0;aoi<activeOutcomes.length;aoi++) { ! OID = activeOutcomes[aoi]; ! modelExpects[PID].updateParameter(aoi,modelDistribution[OID] * numTimesEventsSeen[TID]); ! } if (_useSlackParameter) { for (OID = 0; OID < numOutcomes; OID++) { ! if (!modelExpects[PID].contains(OID)) { CFMOD += modelDistribution[OID] * numTimesEventsSeen[TID]; } *************** *** 468,473 **** // compute the new parameter values for (PID = 0; PID < numPreds; PID++) { ! params[PID].forEachEntry(updateParams); ! modelExpects[PID].transformValues(backToZeros); // re-initialize to 0.0's } if (CFMOD > 0.0 && _useSlackParameter) --- 424,434 ---- // compute the new parameter values for (PID = 0; PID < numPreds; PID++) { ! double[] observed = observedExpects[PID].getParameters(); ! double[] model = modelExpects[PID].getParameters(); ! int[] activeOutcomes = params[PID].getOutcomes(); ! for (int aoi=0;aoi<activeOutcomes.length;aoi++) { ! params[PID].updateParameter(aoi,(Math.log(observed[aoi])) - Math.log(model[aoi])); ! modelExpects[PID].setParameter(aoi,0.0); // re-initialize to 0.0's ! } } if (CFMOD > 0.0 && _useSlackParameter) Index: GISModel.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GISModel.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GISModel.java 11 Jun 2004 20:51:44 -0000 1.13 --- GISModel.java 6 Oct 2005 11:03:47 -0000 1.14 *************** *** 30,34 **** /** Mapping between outcomes and paramater values for each context. * The integer representation of the context can be found using <code>pmap</code>.*/ ! private final TIntParamHashMap[] params; /** Maping between predicates/contexts and an integer representing them. */ private final TObjectIndexHashMap pmap; --- 30,34 ---- /** Mapping between outcomes and paramater values for each context. * The integer representation of the context can be found using <code>pmap</code>.*/ ! private final Context[] params; /** Maping between predicates/contexts and an integer representing them. */ private final TObjectIndexHashMap pmap; *************** *** 45,49 **** private int[] numfeats; ! public GISModel (TIntParamHashMap[] _params, String[] predLabels, String[] _ocNames, --- 45,49 ---- private int[] numfeats; ! public GISModel (Context[] _params, String[] predLabels, String[] _ocNames, *************** *** 65,68 **** --- 65,91 ---- numfeats = new int[numOutcomes]; } + + /* + public GISModel (TIntParamHashMap[] _params, + String[] predLabels, + String[] _ocNames, + int _correctionConstant, + double _correctionParam) { + this(convertToContexts(_params),predLabels,_ocNames,_correctionConstant,_correctionParam); + } + */ + + private static Context[] convertToContexts(TIntParamHashMap[] params) { + Context[] contexts = new Context[params.length]; + for (int pi=0;pi<params.length;pi++) { + int[] activeOutcomes = params[pi].keys(); + double[] activeParameters = new double[activeOutcomes.length]; + for (int oi=0;oi<activeParameters.length;oi++) { + activeParameters[oi] = params[pi].get(activeOutcomes[oi]); + } + contexts[pi] = new Context(activeOutcomes,activeParameters); + } + return contexts; + } /** *************** *** 96,100 **** */ public final double[] eval(String[] context, double[] outsums) { ! int[] activeOutcomes; for (int oid=0; oid<numOutcomes; oid++) { outsums[oid] = iprob; --- 119,124 ---- */ public final double[] eval(String[] context, double[] outsums) { ! int[] activeOutcomes; ! double[] activeParameters; for (int oid=0; oid<numOutcomes; oid++) { outsums[oid] = iprob; *************** *** 104,113 **** int contextIndex = pmap.get(context[i]); if (contextIndex >= 0) { ! TIntParamHashMap predParams = params[contextIndex]; ! activeOutcomes = predParams.keys(); for (int j=0; j<activeOutcomes.length; j++) { int oid = activeOutcomes[j]; numfeats[oid]++; ! outsums[oid] += predParams.get(oid); } } --- 128,138 ---- int contextIndex = pmap.get(context[i]); if (contextIndex >= 0) { ! Context predParams = params[contextIndex]; ! activeOutcomes = predParams.getOutcomes(); ! activeParameters = predParams.getParameters(); for (int j=0; j<activeOutcomes.length; j++) { int oid = activeOutcomes[j]; numfeats[oid]++; ! outsums[oid] += activeParameters[j]; } } Index: GIS.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/GIS.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GIS.java 13 Dec 2003 16:41:29 -0000 1.4 --- GIS.java 6 Oct 2005 11:03:47 -0000 1.5 *************** *** 33,47 **** public static boolean PRINT_MESSAGES = true; ! /** ! * Defines whether the created trainer will use smoothing while training ! * the model. This can improve model accuracy, though training will ! * potentially take longer and use more memory. Model size will also be ! * larger. Set true if smoothing is desired, false if not. */ - public static boolean SMOOTHING = false; - - // If we are using smoothing, this is used as the "number" of - // times we want the trainer to imagine that it saw a feature that it - // actually didn't see. Defaulted to 0.1. public static double SMOOTHING_OBSERVATION = 0.1; --- 33,40 ---- public static boolean PRINT_MESSAGES = true; ! /** If we are using smoothing, this is used as the "number" of ! * times we want the trainer to imagine that it saw a feature that it ! * actually didn't see. Defaulted to 0.1. */ public static double SMOOTHING_OBSERVATION = 0.1; *************** *** 56,60 **** */ public static GISModel trainModel(EventStream eventStream) { ! return trainModel(eventStream, 100, 0, PRINT_MESSAGES); } --- 49,53 ---- */ public static GISModel trainModel(EventStream eventStream) { ! return trainModel(eventStream, 100, 0, false,PRINT_MESSAGES); } *************** *** 73,82 **** int iterations, int cutoff) { ! return trainModel(eventStream, iterations, cutoff, PRINT_MESSAGES); } /** * Train a model using the GIS algorithm. - * * @param eventStream The EventStream holding the data on which this model * will be trained. --- 66,74 ---- int iterations, int cutoff) { ! return trainModel(eventStream, iterations, cutoff, false,PRINT_MESSAGES); } /** * Train a model using the GIS algorithm. * @param eventStream The EventStream holding the data on which this model * will be trained. *************** *** 84,113 **** * @param cutoff The number of times a feature must be seen in order * to be relevant for training. ! * @param printMessagesWhileTraining write training status messages ! * to STDOUT. * @return The newly trained model, which can be used immediately or saved * to disk using an opennlp.maxent.io.GISModelWriter object. */ public static GISModel trainModel(EventStream eventStream, ! int iterations, ! int cutoff, ! boolean printMessagesWhileTraining) { ! GISTrainer trainer = new GISTrainer(printMessagesWhileTraining); ! trainer.setSmoothing(SMOOTHING); ! trainer.setSmoothingObservation(SMOOTHING_OBSERVATION); ! return trainer.trainModel(eventStream, iterations, cutoff); } ! public static GISModel trainModel(int iterations, ! DataIndexer indexer, ! boolean printMessagesWhileTraining) { ! GISTrainer trainer = new GISTrainer(printMessagesWhileTraining); ! trainer.setSmoothing(SMOOTHING); ! trainer.setSmoothingObservation(SMOOTHING_OBSERVATION); ! return trainer.trainModel(iterations, indexer); } public static GISModel trainModel(int iterations, DataIndexer indexer) { ! return trainModel(iterations,indexer,true); } --- 76,113 ---- * @param cutoff The number of times a feature must be seen in order * to be relevant for training. ! * @param smoothing Defines whether the created trainer will use smoothing ! * while training the model. ! * @param printMessagesWhileTraining Determines whether training status messages are written to STDOUT. * @return The newly trained model, which can be used immediately or saved * to disk using an opennlp.maxent.io.GISModelWriter object. */ public static GISModel trainModel(EventStream eventStream, ! int iterations, ! int cutoff, ! boolean smoothing,boolean printMessagesWhileTraining) { ! GISTrainer trainer = new GISTrainer(printMessagesWhileTraining); ! trainer.setSmoothing(smoothing); ! trainer.setSmoothingObservation(SMOOTHING_OBSERVATION); ! return trainer.trainModel(eventStream, iterations, cutoff); } ! /** ! * Train a model using the GIS algorithm. ! * @param iterations The number of GIS iterations to perform. ! * @param indexer The object which will be used for event compilation. ! * @param printMessagesWhileTraining Determines whether training status messages are written to STDOUT. ! * @param smoothing Defines whether the created trainer will use smoothing while training the model. ! * @return The newly trained model, which can be used immediately or saved ! * to disk using an opennlp.maxent.io.GISModelWriter object. ! */ ! public static GISModel trainModel(int iterations, DataIndexer indexer, boolean printMessagesWhileTraining, boolean smoothing) { ! GISTrainer trainer = new GISTrainer(printMessagesWhileTraining); ! trainer.setSmoothing(smoothing); ! trainer.setSmoothingObservation(SMOOTHING_OBSERVATION); ! return trainer.trainModel(iterations, indexer); } public static GISModel trainModel(int iterations, DataIndexer indexer) { ! return trainModel(iterations,indexer,true,false); } |
From: Thomas M. <tsm...@us...> - 2005-10-06 11:03:28
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20496/src/java/opennlp/maxent Added Files: MutableContext.java Context.java Log Message: Created new data structure to hold contexts and their parameters. --- NEW FILE: MutableContext.java --- package opennlp.maxent; import java.util.Arrays; /** * Class used to store parameters or expected values associated with this context which * can be updated or assigned. * @author Tom Morton * */ public class MutableContext extends Context { /** * Creates a new parametes object with the specifed parameters associated with the specified * outcome pattern. * @param outcomePattern Array of outcomes for which parameters exists for this context. * @param parameters Paramaters for the outcomes specified. */ public MutableContext(int[] outcomePattern, double[] parameters) { super(outcomePattern, parameters); } /** * Assigns the parameter or expected value at the specified outcomeIndex the specified value. * @param outcomeIndex The index of the parameter or expected value to be updated. * @param value The value to be assigned. */ public void setParameter(int outcomeIndex, double value) { parameters[outcomeIndex]=value; } /** * Updated the parameter or expected value at the specified outcomeIndex by adding the specified value to its current value. * @param outcomeIndex The index of the parameter or expected value to be updated. * @param value The value to be added. */ public void updateParameter(int outcomeIndex, double value) { parameters[outcomeIndex]+=value; } public boolean contains(int outcome) { return(Arrays.binarySearch(outcomes,outcome) >= 0); } } --- NEW FILE: Context.java --- package opennlp.maxent; /** * Class which associates a real valueed parameter or expected value with a particular contextual * predicate or feature. This is used to store maxent model parameters as well as model and emperical * expected values. * @author Tom Morton * */ public class Context { /** The real valued parameters or expected values for this context. */ protected double[] parameters; /** The outcomes which occur with this context. */ protected int[] outcomes; /** * Creates a new parametes object with the specifed parameters associated with the specified * outcome pattern. * @param outcomePattern Array of outcomes for which parameters exists for this context. * @param parameters Paramaters for the outcomes specified. */ public Context(int[] outcomePattern, double[] parameters) { this.outcomes = outcomePattern; this.parameters = parameters; } /** * Returns the outcomes for which parameters exists for this context. * @return Array of outcomes for which parameters exists for this context. */ public int[] getOutcomes() { return outcomes; } /** * Returns the paramaters or expected values for the outcomes which occur with this context. * @return Array of paramaters for the outcomes of this context. */ public double[] getParameters() { return parameters; } } |
From: Thomas M. <tsm...@us...> - 2004-08-29 20:12:06
|
Update of /cvsroot/maxent/maxent/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28315/docs Modified Files: index.html Log Message: update email reference. Index: index.html =================================================================== RCS file: /cvsroot/maxent/maxent/docs/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.html 3 Jan 2002 16:14:41 -0000 1.4 --- index.html 29 Aug 2004 20:11:58 -0000 1.5 *************** *** 68,73 **** <h3> ! Email: <a href="mailto:jm...@co...">jm...@co...</a><br> ! 2002 January 02 <br> <br> <A href="http://sourceforge.net"> <IMG src="http://sourceforge.net/sflogo.php?group_id=5961&type=1" width="88" height="31" border="0"></A> <br> --- 68,79 ---- <h3> ! Email: <a href="mailto:tsm...@us...">tsm...@us...</a><br> ! <script language="JavaScript"> ! <!---// ! var Months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); ! var lm = new Date (document.lastModified); ! document.write(Months[lm.getMonth()]+" "+lm.getDate()+" "+lm.getFullYear()); ! //---> ! </script> <br> <A href="http://sourceforge.net"> <IMG src="http://sourceforge.net/sflogo.php?group_id=5961&type=1" width="88" height="31" border="0"></A> <br> |
From: Thomas M. <tsm...@us...> - 2004-08-29 19:01:07
|
Update of /cvsroot/maxent/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15558 Modified Files: build.xml Log Message: updated to reflect new release. Index: build.xml =================================================================== RCS file: /cvsroot/maxent/maxent/build.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** build.xml 10 May 2004 03:11:15 -0000 1.22 --- build.xml 29 Aug 2004 19:00:57 -0000 1.23 *************** *** 10,14 **** <property name="Name" value="Maxent" /> <property name="name" value="maxent" /> ! <property name="version" value="2.2.0" /> <property name="year" value="2004"/> --- 10,14 ---- <property name="Name" value="Maxent" /> <property name="name" value="maxent" /> ! <property name="version" value="2.3.0" /> <property name="year" value="2004"/> |
From: Thomas M. <tsm...@us...> - 2004-08-29 19:00:31
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15395/src/java/opennlp/maxent Added Files: package.html Log Message: added package javadoc --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <!-- --> </head> <body bgcolor="white"> Provides main functionality of the maxent package including data structures and algorithms for parameter estimation. </body> </html> |
From: Thomas M. <tsm...@us...> - 2004-08-29 19:00:31
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15395/src/java/opennlp/maxent/io Added Files: package.html Log Message: added package javadoc --- NEW FILE: package.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <!-- --> </head> <body bgcolor="white"> Provides the I/O functionality of the maxent package including reading and writting models in several formats. </body> </html> |
From: Thomas M. <tsm...@us...> - 2004-08-29 18:59:44
|
Update of /cvsroot/maxent/maxent/src/java/opennlp/maxent/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15171/src/java/opennlp/maxent/io Modified Files: BinaryGISModelWriter.java Log Message: fixed or added some javadoc Index: BinaryGISModelWriter.java =================================================================== RCS file: /cvsroot/maxent/maxent/src/java/opennlp/maxent/io/BinaryGISModelWriter.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** BinaryGISModelWriter.java 23 Oct 2001 14:06:53 -0000 1.1.1.1 --- BinaryGISModelWriter.java 29 Aug 2004 18:59:35 -0000 1.2 *************** *** 57,61 **** * * @param model The GISModel which is to be persisted. ! * @param bw The BufferedWriter which will be used to persist the model. */ public BinaryGISModelWriter (GISModel model, DataOutputStream dos) { --- 57,61 ---- * * @param model The GISModel which is to be persisted. ! * @param dos The stream which will be used to persist the model. */ public BinaryGISModelWriter (GISModel model, DataOutputStream dos) { |