Examples of SymbolTable


Examples of org.exist.dom.SymbolTable

                        isReadOnly = true;
                    }
                    // If the initialization fails after transactionManager has been created this method better cleans up
                    // or the FileSyncThread for the journal can/will hang.
                    try {
                        symbols = new SymbolTable(this, conf);
                        isReadOnly = isReadOnly || !symbols.getFile().canWrite();

                        indexManager = new IndexManager(this, conf);

                        //TODO : replace the following code by get()/release() statements ?
View Full Code Here

Examples of org.jatha.util.SymbolTable

  {

    // EVAL must be before SYMTAB.
    EVAL    = new LispEvaluator(this);

    SYMTAB  = new SymbolTable(this);

    initializeConstants();

    // Have to be careful about initializing this...
View Full Code Here

Examples of org.jatha.util.SymbolTable

      f_uses       = puses;

    if (symtab instanceof SymbolTable)
      f_symbolTable = symtab;
    else
      f_symbolTable = new SymbolTable(f_lisp);

    if (shadows instanceof SymbolTable)
      f_shadowingSymbols = shadows;
    else
      f_shadowingSymbols = new SymbolTable(f_lisp);
  }
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.compiler.SymbolTable

            drv.compileExpr(expression);
        }

        int getConstantValue(ConstPool cp, CtClass type) {
            try {
                ASTree t = Javac.parseExpr(expression, new SymbolTable());
                return getConstantValue2(cp, type, t);
            }
            catch (CompileError e) {
                return 0;
            }
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

      throw new HeadRuleException("The specification of the head rule is not correct '"+ruleSpec+"'. ");
    }
   
    int index = items[0].indexOf(':');
    if (index != -1) {
      SymbolTable t = getDataFormatInstance().getSymbolTables().getSymbolTable(items[0].substring(0, index));
      if (t == null) {
        throw new HeadRuleException("The specification of the head rule is not correct '"+ruleSpec+"'. ");
      }
      setTable(t);
      setSymbolCode(table.addSymbol(items[0].substring(index+1)));
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

    for (int i = 0; i < disItems.length; i++) {
      String[] conItems = spec.split("\\&");
      for (int j = 0; j < conItems.length; j++) {
        int index = conItems[j].indexOf(':');
        if (index != -1) {
          SymbolTable table = prioList.getDataFormatInstance().getSymbolTables().getSymbolTable(conItems[j].substring(0, index));
          ColumnDescription column = prioList.getDataFormatInstance().getColumnDescriptionByName(conItems[j].substring(0, index));
          if (i == 0 && j == 0) {
            addPrioSetMember(table, column, conItems[j].substring(index+1), RelationToPrevMember.START);
          } else if (j == 0) {
            addPrioSetMember(table, column, conItems[j].substring(index+1), RelationToPrevMember.DISJUNCTION);
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

   */
  public String[] parseTokens(String[] tokens) throws MaltChainedException {
    DependencyStructure outputGraph = parse(tokens);
    StringBuilder sb = new StringBuilder();
    String[] outputTokens = new String[tokens.length];
    SymbolTable deprelTable = outputGraph.getSymbolTables().getSymbolTable("DEPREL");
    for (Integer index : outputGraph.getTokenIndices()) {
      sb.setLength(0);
      if (index <= tokens.length) {
        DependencyNode node = outputGraph.getDependencyNode(index);
        sb.append(tokens[index -1]);
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

 
  public void load(InputStreamReader isr) throws MaltChainedException  {
    try {
      BufferedReader bin = new BufferedReader(isr);
      String fileLine;
      SymbolTable table = null;
      bin.mark(2);
      if (bin.read() == '\t') {
        bin.reset();
        loadHeader(bin);
      } else {
        bin.reset();
      }
      while ((fileLine = bin.readLine()) != null) {
        if (fileLine.length() > 0) {
          table = addSymbolTable(fileLine);
          table.load(bin);
        }
      }
      bin.close();
    } catch (IOException e) {
      throw new SymbolException("Could not load the symbol tables. ", e);
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

      }
    }
  }
 
  public void copyPartialDependencyStructure(DependencyStructure sourceGraph, DependencyStructure targetGraph) throws MaltChainedException {
    SymbolTable partHead = cachedSource.getSymbolTables().getSymbolTable("PARTHEAD");
    SymbolTable partDeprel = cachedSource.getSymbolTables().getSymbolTable("PARTDEPREL");
    if (partHead == null || partDeprel == null) {
      return;
    }
    SymbolTable deprel = cachedTarget.getSymbolTables().getSymbolTable("DEPREL");
    for (int index : sourceGraph.getTokenIndices()) {
      DependencyNode snode = sourceGraph.getTokenNode(index);
      DependencyNode tnode = targetGraph.getTokenNode(index);
      if (snode != null && tnode != null) {
        int spartheadindex = Integer.parseInt(snode.getLabelSymbol(partHead));
View Full Code Here

Examples of org.maltparserx.core.symbol.SymbolTable

 
  private void writeElement(PhraseStructureNode element) throws MaltChainedException {
    try {
      if (element instanceof TokenNode) {
        PhraseStructureNode t = (PhraseStructureNode)element;
        SymbolTable table = null;
        writer.write(STARTING_BRACKET);
        int i = 0;
        for (String inputColumn : inputColumns.keySet()) {
          if (i != 0) {
            writer.write(INPUT_SEPARATOR);
          }
          table = inputColumns.get(inputColumn).getSymbolTable();
          if (t.hasLabel(table)) {
            writer.write(t.getLabelSymbol(table));
          }
          if (i == 0) {
            for (String edgeLabelColumn : edgeLabelColumns.keySet()) {
              table = edgeLabelColumns.get(edgeLabelColumn).getSymbolTable();
              if (t.hasParentEdgeLabel(table) && !t.getParent().isRoot() && !t.getParentEdgeLabelSymbol(table).equals(EMPTY_EDGELABEL)) {
                writer.write(EDGELABEL_SEPARATOR);
                writer.write(t.getParentEdgeLabelSymbol(table));
              }
            }
          }
          i++;
        }
        writer.write(CLOSING_BRACKET);
      } else {
        NonTerminalNode nt = (NonTerminalNode)element;
        writer.write(STARTING_BRACKET);
        SymbolTable table = null;
        int i = 0;
        for (String phraseLabelColumn : phraseLabelColumns.keySet()) {
          if (i != 0) {
            writer.write(INPUT_SEPARATOR);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.