def testDecodeSyntheticWord_WordSmallJJ_expectTranslation_99(self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act result = embedding.decode_synthetic_word('jj') #assert assertThat(result).matches('99')
def testDecodeSyntheticWord_Empty_expectEmpty(self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act result = embedding.decode_synthetic_word('') #assert assertThat(result).is_empty()
def testDedodeEmbeddingLine_Embedding47_expectSizeOfEmbeddigIs512(self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act _, result = embedding.decode_embedding_line(EMBEDDING_OF_47) #assert assertThat(result).is_nuple(512)
def testDedodeEmbeddingLine_Embedding47_expectHasOneDimension(self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act _, result = embedding.decode_embedding_line(EMBEDDING_OF_47) #assert assertThat(result).has_dimensionality(1)
def testDecodeEmbeddingLine_Embedding47_expectDecodedIndexIsNotZero(self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act result, _ = embedding.decode_embedding_line(EMBEDDING_OF_47) #assert assertThat(result).is_not_zero()
def testDecodeSyntheticWord_WordSmallBCDEFGHIJA_expectTranslation_1234567890( self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act result = embedding.decode_synthetic_word('bcdefghija') #assert assertThat(result).matches('1234567890')
def testDecodeEmbeddingLine_TheUnknownEmbedding_expectDecodedIndexIsZero( self): # arrange embedding = dl4jembeddings.DL4jModifiedEmbeddings() #act result, _ = embedding.decode_embedding_line(EMBEDDING_OF_UNKNOWN) #assert assertThat(result).is_zero()