Examples of Embedding


Examples of com.clearnlp.morphology.Embedding

  {
    Element eEmbed = UTXml.getFirstElementByTagName(eConfig, "embedding");
    if (eEmbed == nullreturn null;
   
    String path = UTXml.getTrimmedTextContent(eEmbed);
    Embedding embed = null;
   
    try
    {
      ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(path)));
      embed = (Embedding)in.readObject();
View Full Code Here

Examples of com.mysql.clusterj.jpatest.model.Embedding

    public void test() {
        removeAll(Embedding.class);
        em.getTransaction().begin();
        for (int i = 0; i < NUMBER_OF_INSTANCES ; ++i) {
            Embedding e = createEmbedding(i);
            em.persist(e);
        }
        em.getTransaction().commit();
    }
View Full Code Here

Examples of com.mysql.clusterj.jpatest.model.Embedding

    private Embedding createEmbedding(int i) {
        Embedded embedded = new Embedded();
        embedded.setAge(i);
        embedded.setName("Embedded " + i);
        Embedding embedding = new Embedding();
        embedding.setId(i);
        embedding.setMagic(i);
        embedding.setEmbedded(embedded);
        return embedding;
    }
View Full Code Here

Examples of edu.stanford.nlp.neural.Embedding

      wordVectors.put(word, vector);
    }
  }

  void readWordVectors() {
    Embedding embedding = new Embedding(op.wordVectors, op.numHid);
    this.wordVectors = Generics.newTreeMap();
//    Map<String, SimpleMatrix> rawWordVectors = NeuralUtils.readRawWordVectors(op.wordVectors, op.numHid);
//    for (String word : rawWordVectors.keySet()) {
    for (String word : embedding.keySet()) {
      // TODO: factor out unknown word vector code from DVParser
      wordVectors.put(word, embedding.get(word));
    }

    String unkWord = op.unkWord;
    SimpleMatrix unknownWordVector = wordVectors.get(unkWord);
    wordVectors.put(UNKNOWN_WORD, unknownWordVector);
View Full Code Here

Examples of edu.stanford.nlp.neural.Embedding

    int chineseYearCount = 0;
    int chineseNumberCount = 0;
    int chinesePercentCount = 0;

    //Map<String, SimpleMatrix> rawWordVectors = NeuralUtils.readRawWordVectors(op.lexOptions.wordVectorFile, op.lexOptions.numHid);
    Embedding rawWordVectors = new Embedding(op.lexOptions.wordVectorFile, op.lexOptions.numHid);

    for (String word : rawWordVectors.keySet()) {
      SimpleMatrix vector = rawWordVectors.get(word);

      if (op.wordFunction != null) {
        word = op.wordFunction.apply(word);
      }
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.