codesimian
Class InterpretText.WordPairDistance

java.lang.Object
  extended by codesimian.CS<CSGeneric>
      extended by codesimian.DefaultCS
          extended by codesimian.InterpretText
              extended by codesimian.InterpretText.WordIndexs
                  extended by codesimian.InterpretText.WordPairDistance
All Implemented Interfaces:
CodeSimian
Enclosing class:
InterpretText

public static class InterpretText.WordPairDistance
extends InterpretText.WordIndexs

Builds a 2d matrix, pairing each unique word with each other, and finds the shortest distances between each pair of unique words. (tries to?) normalizes it, and returns it as a 1d matrix (values 0 to 1). words[] is a sequence of word indexs in range 0 to myNaturalLanguage.wordCount()-1. Returns an array size myNaturalLanguage.wordCount()^2.


Nested Class Summary
 
Nested classes/interfaces inherited from class codesimian.InterpretText
InterpretText.AllLetterPairs, InterpretText.AllLetterTriples, InterpretText.Concat, InterpretText.Normalize, InterpretText.SelectIndexs, InterpretText.Str, InterpretText.WordIndexs, InterpretText.WordPairDistance, InterpretText.WrapAroundSmallerRangeAndAverageOverlappingValues
 
Field Summary
protected  NaturalLanguage nl
           
 
Fields inherited from class codesimian.CS
DESCRIPTION, END, EXECPROXY, HEAP, JAVACODE, MYFUEL, NAME, NEWINSTANCE, NULL, PARENT, PARSEPRIORITY, PREV, TESTER, THIS
 
Constructor Summary
InterpretText.WordPairDistance(NaturalLanguage nl)
           
 
Method Summary
 int arraySize()
          size that returned array of interpret() must be
 double[] interpret(int[] words)
           
 
Methods inherited from class codesimian.InterpretText.WordIndexs
interpret
 
Methods inherited from class codesimian.InterpretText
description, DForProxy, minP
 
Methods inherited from class codesimian.DefaultCS
B, C, countP, decrementMyFuel, deleteP, F, fuel, getExec, getObject, heap, I, indexP, indexPName, insertB, insertC, insertD, insertF, insertI, insertJ, insertL, insertL, insertL1, insertP, insertS, insertZ, J, javaCode, keyword, LForProxy, LForProxy, myFuel, name, newInstance, objectToCS, objectToCSArray, objectToCSArray, P, prevD, prevL, PType, S, setB, setC, setCountP, setD, setD, setExec, setF, setFuel, setI, setJ, setL, setL, setL, setL1, setMyFuel, setName, setObject, setP, setPrevExec, setPType, setS, setZ, start, toString, V, Z
 
Methods inherited from class codesimian.CS
addB, addC, addD, addF, addI, addJ, addL, addP, addP, addP, addP, addP, addS, addZ, BForProxy, CForProxy, clone, cost, D, deleteP, FForProxy, GETB, GETC, GETD, GETF, GETI, GETJ, GETL, GETS, GETZ, IForProxy, isIllusion, JForProxy, L, L, L, L, L, maxD, maxP, minD, overwrites, parent, parsePriority, PB, PC, PD, PF, PI, PJ, PL, prevB, prevC, prevF, prevI, prevJ, prevS, prevZ, proxyOf, PS, PZ, reflect, reflect, reflect6, setB, SETB, setC, SETC, setCost, SETD, setDescription, setF, SETF, setHeap, setI, SETI, setJ, SETJ, SETL, setL, setL, setParent, setParsePriority, setProxyOf, setS, SETS, setTester, setZ, SETZ, SForProxy, tester, toJavaCode, VForProxy, voidReflect, ZForProxy
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nl

protected NaturalLanguage nl
Constructor Detail

InterpretText.WordPairDistance

public InterpretText.WordPairDistance(NaturalLanguage nl)
Method Detail

interpret

public double[] interpret(int[] words)
Specified by:
interpret in class InterpretText.WordIndexs

arraySize

public int arraySize()
Description copied from class: InterpretText
size that returned array of interpret() must be

Specified by:
arraySize in class InterpretText