code: private IntegerVector getSemanticVector(String word) {
          IntegerVector v = wordToMeaning.get(word);
          if (v == null) {
              // lock on the word in case multiple threads attempt to add it at
              // once
              synchronized(this) {
                  // recheck in case another thread added it while we were waiting
                  // for the lock
                  v = wordToMeaning.get(word);
                  if (v == null) {
                      v = (useSparseSemantics) 
                          ? new CompactSparseIntegerVector(vectorLength)
                          : new DenseIntVector(vectorLength);
                      wordToMeaning.put(word, v);
                  }
              }
          }
          return v;
      }
docs: Returns the current semantic vector for the provided word, or if the word
  is not currently in the semantic space, a vector is added for it and
  returned.
  
  @param word a word
  
  @return the {@code SemanticVector} for the provide word.