RE: [Classifier4j-devel] Training and Classifying
Status: Beta
Brought to you by:
nicklothian
From: Neil G. <np...@nt...> - 2004-05-20 10:01:12
|
Thanks Nick, The case-sensitivity was the problem. Thanks for your help. Regards, Neil > -----Original Message----- > From: cla...@li... [mailto:classifier4j- > dev...@li...] On Behalf Of Nick Lothian > Sent: 20 May 2004 00:32 > To: 'cla...@li...' > Subject: RE: [Classifier4j-devel] Training and Classifying > > That means that PostgreSQL is case sensitive. > > Please get the CVS version (in particular > <http://cvs.sourceforge.net/viewcvs.py/*checkout*/classifier4j/Classifie r4 > J/ > src/java/net/sf/classifier4J/bayesian/JDBCWordsDataSource.java?rev=1.14> ) > or > just apply the modification yourself: > <http://cvs.sourceforge.net/viewcvs.py/classifier4j/Classifier4J/src/jav a/ > ne > t/sf/classifier4J/bayesian/JDBCWordsDataSource.java?r1=1.13&r2=1.14> > > > Hopefully that will fix your problems. > > Nick > > > -----Original Message----- > > From: Neil Gandhi [mailto:np...@nt...] > > Sent: Wednesday, 19 May 2004 12:18 AM > > To: cla...@li... > > Subject: RE: [Classifier4j-devel] Training and Classifying > > Importance: Low > > > > > > Hi Nick, > > > > I really appreciate the advice you are providing. > > > > After running the code you provided, the following is output: > > > > word_probability (in lower case) Result Set: > > TABLE_CAT = null > > TABLE_SCHEM = public > > TABLE_NAME = word_probability > > TABLE_TYPE = TABLE > > REMARKS = null > > End of Result Set > > WORD_PROBABILITY (in UPPER case) Result Set: > > End of Result Set > > > > I had to comment out TYPE_CAT, TYPE_SCHEM, TYPE_NAME, > > SELF_REFERENCING_COL_NAME, REF_GENERATION > > Because an error occurred saying that these column names could not be > > found. > > > > The Java API says: "Note: Some databases may not return > > information for > > all tables." > > > > What I understand from the above output is that when UPPER > > case is used, > > the Result Set does not have any values. > > Do you agree? > > > > Regards > > > > Neil > > > > > -----Original Message----- > > > From: cla...@li... > > [mailto:classifier4j- > > > dev...@li...] On Behalf Of Nick Lothian > > > Sent: 19 May 2004 00:54 > > > To: 'cla...@li...' > > > Subject: RE: [Classifier4j-devel] Training and Classifying > > > > > > > > > > > Hi Nick, > > > > > > > > > Is PostgreSQL case sensitive with respect to table names? > > > > > > > > PostgreSQL is not case-sensitive - I have tested this. > > > > > > > > > > Are you sure about this? There seems to be a fair bit of discussion > > about > > > the inability to switch it off: > > <http://forums.devshed.com/archive/t- > > > 44274> > > > > > > > > If that doesn't help, can please send the result set > > > > returned from the > > > > > following code: > > > > > > > > > > DatabaseMetaData dbm = con.getMetaData(); > > > > > ResultSet rs = dbm.getTables(null, null, "word_probability", > > null); > > > > > > > > I'm not too sure what you mean when you say to "send the > > > > result set" to > > > > you. > > > > What method should I call on the ResultSet. > > > > > > > > When I do: > > > > ResultSetMetaData rM = rs.getMetaData(); > > > > String name = rM.getColumnName(2); > > > > > > > > The value of name is "table_schem". Shouldn't it be one of > > > > the names of > > > > the columns in the word_probability table?? > > > > > > > > > > No. The getTables(..) call gets data about the tables that exist in > > the > > > database. See > > > > > <http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMeta > > Data.html# > > ge > > > tT > > > > > ables(java.lang.String,%20java.lang.String,%20java.lang.String > > ,%20java.l > > an > > > g. > > > String[])> > > > > > > Could you please run code like > > > > > > System.out.println("word_probability (in lower case) Result Set:"); > > > DatabaseMetaData dbm = con.getMetaData(); > > > ResultSet rs = dbm.getTables(null, null, "word_probability", null); > > > while (rs.next()) { > > > System.out.println("TABLE_CAT = " + rs.getString("TABLE_CAT")); > > > System.out.println("TABLE_SCHEM = " + > > rs.getString("TABLE_SCHEM")); > > > System.out.println("TABLE_NAME = " + > > rs.getString("TABLE_NAME")); > > > System.out.println("TABLE_TYPE = " + > > rs.getString("TABLE_TYPE")); > > > System.out.println("REMARKS = " + rs.getString("REMARKS")); > > > System.out.println("TYPE_CAT = " + rs.getString("TYPE_CAT")); > > > System.out.println("TYPE_SCHEM = " + > > rs.getString("TYPE_SCHEM")); > > > System.out.println("TYPE_NAME = " + rs.getString("TYPE_NAME")); > > > System.out.println("SELF_REFERENCING_COL_NAME = " + > > > rs.getString("SELF_REFERENCING_COL_NAME")); > > > System.out.println("REF_GENERATION = " + > > > rs.getString("REF_GENERATION")); > > > } > > > System.out.println("End of Result Set"); > > > rs.close(); > > > > > > System.out.println("WORD_PROBABILITY (in UPPER case) Result Set:"); > > > dbm = con.getMetaData(); > > > rs = dbm.getTables(null, null, "WORD_PROBABILITY", null); > > > while (rs.next()) { > > > System.out.println("TABLE_CAT = " + rs.getString("TABLE_CAT")); > > > System.out.println("TABLE_SCHEM = " + > > rs.getString("TABLE_SCHEM")); > > > System.out.println("TABLE_NAME = " + > > rs.getString("TABLE_NAME")); > > > System.out.println("TABLE_TYPE = " + > > rs.getString("TABLE_TYPE")); > > > System.out.println("REMARKS = " + rs.getString("REMARKS")); > > > System.out.println("TYPE_CAT = " + rs.getString("TYPE_CAT")); > > > System.out.println("TYPE_SCHEM = " + > > rs.getString("TYPE_SCHEM")); > > > System.out.println("TYPE_NAME = " + rs.getString("TYPE_NAME")); > > > System.out.println("SELF_REFERENCING_COL_NAME = " + > > > rs.getString("SELF_REFERENCING_COL_NAME")); > > > System.out.println("REF_GENERATION = " + > > > rs.getString("REF_GENERATION")); > > > } > > > System.out.println("End of Result Set"); > > > rs.close(); > > > > > > (Note that this hasn't been tested, but it should pretty close) > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.Net email is sponsored by: SourceForge.net Broadband > > > Sign-up now for SourceForge Broadband and get the fastest > > > 6.0/768 connection for only $19.95/mo for the first 3 months! > > > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > > > _______________________________________________ > > > Classifier4j-devel mailing list > > > Cla...@li... > > > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: Oracle 10g > > Get certified on the hottest thing ever to hit the market... > > Oracle 10g. > > Take an Oracle 10g class now, and we'll give you the exam FREE. > > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > > _______________________________________________ > > Classifier4j-devel mailing list > > Cla...@li... > > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Classifier4j-devel mailing list > Cla...@li... > https://lists.sourceforge.net/lists/listinfo/classifier4j-devel |