错误:找不到对象
本帖最后由 u012055150 于 2014-03-24 23:57:42 编辑
// 红色字标注错误地方
// 觉得该定义的都定义了,实在看不懂什么地方错了,我是菜鸟,救救我吧
package segmentation;
import java.util.*;
import Dictionnaire.*;
public class Morphologie {
public class Syntagme {
public static final int PHRASE=0;
private String chaine;
protected String categorie;
protected List<Syntagme> composants;
public Syntagme(String mot) {
chaine= mot;
}
public Syntagme(List<Syntagme> s,String cat) {
composants=s;
categorie=cat;
}
public Syntagme(String mot, String cat) {
chaine= mot;
categorie= cat;
}
public String toString() {
return chaine;
}
public void setCategorie(String s) {
categorie=s;
}
public String getCategorie() {
return categorie;
}
}
public class Segmentation {
public Segmentation instance;
public class Segmenteur {
protected Collection<Segmenteur> segmentations;
private void Segmentation() {
segmentations = new ArrayList<Segmenteur>();
segmentations.add(new Segmentation1()); // 错误: 找不到符号
segmentations.add(new Segmentation2()); // 错误: 找不到符号
}
}
public Segmentation getInstance() {
if (instance == null)
instance = new Segmentation();
return instance;
}
}
public static String[][] getCombinaisons(List<Collection> etiquettes)
{
int compt=1;
int nbreMots=etiquettes.size();
for(Collection tags:etiquettes)
{
compt*= tags.size();
}
String[][] matrice = new String[compt][nbreMots];
for(int i=0;i<matrice.length-1;i++)
for(int j=0;j<matrice[i].length-1;j++)
{
List et= (List) etiquettes.get(j);
int l= et.size();
System.out.println(l);
System.out.println(et);
matrice[i][j]= (String) et.get((int)(i/l));
}
return matrice;
}
public static void main(String[] args) throws Exception {
Dictionnaire dico= Dictionnaire.getInstance();
Collection<String> etiquettes;
List<Collection> lemmes= new Vector<Collection>();
for(Syntagme mot:Syntagme()) // 错误: 找不到符号