Система контент-анализа естественно-языковых текстов

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование



se()

{

( ((byte) (flags & 0x08)) != 0x00 )true;false;

}

boolean getFlagEndWord()

{( ((byte) (flags & 0x02)) != 0x00 )true;false;

}

boolean getFlagBase()

{( ((byte) (flags & 0x04)) != 0x00 )true;false;

}

boolean getFlagIn_MainWord()

{( ((byte) (flags & 0x01)) != 0x00 )true;false;

}

}

interfaces;

analysis.Load_Text;dictionaries.MorphMain;java.io.BufferedReader;java.io.BufferedWriter;java.io.File;java.io.FileReader;java.io.FileWriter;java.io.IOException;java.util.logging.Level;java.util.logging.Logger;class AppendFormsDict extends javax.swing.JDialog {path;out;

/** Creates new form AppendFormsDict */AppendFormsDict(java.awt.Frame parent, boolean modal,MorphMain mm) {(parent, modal);();= mm.so.getPForms();

}void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {{(jTextField1.getText().isEmpty())

{.swing.JOptionPane.showMessageDialog(this, "Нельзя добавить пустую группу словоформ!");;

}= new BufferedWriter(new FileWriter(path,true));.append(jTextField1.getText());.newLine();.flush();.close();.swing.JOptionPane.showMessageDialog(this, "Группа успешно добавлена! Изменения вступят в силу после перезапуска системы.");.setText("");

} catch (IOException ex) {.getLogger(AppendFormsDict.class.getName()).log(Level.SEVERE, null, ex);

}

}

void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {(); // TODO add your handling code here:

}

/**

* @param args the command line arguments

*/static void main(String args[]) {.awt.EventQueue.invokeLater(new Runnable() {void run() {dialog = new AppendFormsDict(new javax.swing.JFrame(), true,null);.addWindowListener(new java.awt.event.WindowAdapter() {void windowClosing(java.awt.event.WindowEvent e) {.exit(0);

}

});.setVisible(true);

}

});

}

// Variables declaration - do not modifyjavax.swing.JButton jButton1;javax.swing.JButton jButton2;javax.swing.JLabel jLabel2;javax.swing.JPanel jPanel1;javax.swing.JTextField jTextField1;

// End of variables declaration

}

interfaces;

java.io.BufferedWriter;java.io.File;java.io.FileWriter;java.io.IOException;java.util.logging.Level;java.util.logging.Logger;

class Config extends javax.swing.JFrame {

/** Creates new form Config */Config() {();

}void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {.dispose();

}

void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {out = null;{f;= new File("Config.ini");par1;par2;par3;= "PathForms=" + jTextField1.getText();= "PathStop=" + jTextField2.getText();= "DefaultLimit=" + jSpinner1.getValue();

= new BufferedWriter(new FileWriter(f));

.write(par1, 0,par1.length());.newLine();.write(par2, 0,par2.length());.newLine();.write(par3, 0,par3.length());.newLine();.close();.swing.JOptionPane.showMessageDialog(this, "Настройки успешно сохранены!");.dispose();

} catch (IOException ex) {.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);

} finally {{.close();

} catch (IOException ex) {.getLogger(Config.class.getName()).log(Level.SEVERE, null, ex);

}

}

}

/**

* @param args the command line arguments

*/static void main(String args[]) {.awt.EventQueue.invokeLater(new Runnable() {void run() {Config().setVisible(true);

}

});

}

// Variables declaration - do not modifyjavax.swing.JButton jButton1;javax.swing.JButton jButton2;javax.swing.JLabel jLabel1;javax.swing.JLabel jLabel2;javax.swing.JLabel jLabel3;javax.swing.JPanel jPanel1;

private javax.swing.JSpinner jSpinner1;

private javax.swing.JTextField jTextField1;javax.swing.JTextField jTextField2;

// End of variables declaration

}

interfaces;

analysis.Load_Text;dictionaries.MorphMain;java.io.BufferedReader;java.io.BufferedWriter;java.io.File;java.io.FileNotFoundException;java.io.FileReader;java.io.FileWriter;java.io.IOException;java.util.logging.Level;java.util.logging.Logger;javax.swing.DefaultListModel;

class EditStopDict extends javax.swing.JDialog {path;

/** Creates new form EditStopDict */EditStopDict(java.awt.Frame parent, boolean modal, MorphMain mm) {(parent, modal);out = null;{();= mm.so.getPStop();y;dlm;= new DefaultListModel();= new BufferedReader(new FileReader(path));((y = out.readLine()) != null) {.addElement(y);

}.setModel(dlm);

} catch (IOException ex) {.getLogger(EditStopDict.class.getName()).log(Level.SEVERE, null, ex);

} finally {{.close();

} catch (IOException ex) {.getLogger(EditStopDict.class.getName()).log(Level.SEVERE, null, ex);

}

}

}

void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {();

}void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {(jTextField1.getText().isEmpty()).swing.JOptionPane.showMessageDialog(this, "Нельзя добавить пустое слово!");

{dlm;= (DefaultListModel) jList1.getModel();.addElement(jTextField1.getText());.setModel(dlm);.setText("");.swing.JOptionPane.showMessageDialog(this,"Слово добавлено");

}

}void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {(jList1.getSelectedIndex() != -1)

{l;= jList1.getSelectedIndex();dlm;= (DefaultListModel) jList1.getModel();.removeElementAt(l);.setModel(dlm);

}javax.swing.JOptionPane.showMessageDialog(this, "Сначала выберите стоп-слово");

}

void jList1MouseClicked(java.awt.event.MouseEvent evt) {(!jList1.isSelectionEmpty()) jTextField1.setText(jList1.getSelectedValue().toString());

}void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {{dlm;= (DefaultListModel) jList1.getModel();out = new BufferedWriter(new FileWriter(path));(int i = 0; i < dlm.getSize(); i++)

{.write(dlm.getElementAt(i).toString());.newLine();

}.flush();.close();.swing.JOptionPane.showMessageDialog(this,"Изменения вступят в силу после перезапуска системы.");();

} catch (IOException ex) {.getLogger(EditStopDict.class.getName()).log(Level.SEVERE, null, ex);

}

}

void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {(jList1.getSelectedIndex() != -1)

{l;= jList1.getSelectedIndex();dlm;= (DefaultListModel) jList1.getModel();(jTextField1.getText().isEmpty())

{.swing.JOptionPane.showMessageDialog(this, "Нельзя добавить пустое слово!!!");

}

{.removeElementAt(l);.insertElementAt(jTextField1.getText(), l);.setModel(dlm);

}

}javax.swing.JOptionPane.showMessageDialog(this, "Сначала выберите стоп-слово");

}

/**

* @param args the command line arguments

*/static void main(String args[]) {.awt.EventQueue.invokeLater(new Runnable() {void run() {dialog = new EditStopDict(new javax.swing.JFrame(), true,null);.addWindowListener(new java.awt.event.WindowAdapter() {void windowClosing(java.awt.event.WindowEvent e) {.exit(0);

}

});.setVisible(true);

}

});

}

// Variables declaration - do not modifyjavax.swing.JButton jButton1;javax.swing.JButton jButton2;javax.swing.JButton jButton3;javax.swing.JButton jButton4;javax.swing.JButton jButton5;javax.swing.JList jList1;javax.swing.JPanel jPanel1;javax.swing.JScrollPane jScrollPane1;javax.swing.JTextField jTextField1;

// End of variables declaration

}

interfaces;dictionaries.MorphMain;javax.swing.DefaultListModel;

class FormsFind extends javax.swing.JDialog {m;

/** Creates new form FormsFind */FormsFind(java.awt.Frame parent, boolean modal,MorphMain mm) {(parent, modal);();= mm;

}

void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {(); }void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {f;answer;= "";(jTextField1.getText().isEmpty()).swing.JOptionPane.showMessageDialog(this,"Нельзя найти словоформы для пустого слова!");

{dlm = new DefaultListModel();= m.getRelativewords(dlm,jTextField1.getText(),false );(f)

{="Словоформы: ";(int i = 0;i<dlm.getSize();i++)

{+=dlm.getElementAt(i)+" ";.out.println(dlm.getElementAt(i));

}

}

else

{answer = "Данное слово отсутствует в словаре. Извините.";

}.swing.JOptionPane.showMessageDialog(this, answer);

}

}

/**

* @param args the command line arguments

*/static void main(String args[]) {.awt.EventQueue.invokeLater(new Runnable() {void run() {dialog = new FormsFind(new javax.swing.JFrame(), true,null);.addWindowListener(new java.awt.event.WindowAdapter() {void windowClosing(java.awt.event.WindowEvent e) {.exit(0);

}

});.setVisible(true);

}

});

}

// Variables declaration - do not modifyjavax.swing.JButton jButton1;javax.swing.JButton jButton2;javax.swing.JLabel jLabel1;javax.swing.JPanel jPanel1;javax.swing.JTextField jTextField1;

// End of variables declaration

}interfaces;

dictionaries.StopMain;analysis.*;java.io.File;java.io.IOExcep