Labeling an unseen corpus

Part 0, everything mixed

Lets prepare the data

link

Wikipedia

Bunch of imports


In [1]:
%matplotlib inline
from __future__ import absolute_import
from __future__ import print_function

# import local library
import tools
import prepare
import lemmatize
import analyze
import preprocess
import nnlstm

Exctract the MedLine data


In [2]:
data = prepare.extract_txt('data/toy_corpus.txt')


Exctracting from 'toy_corpus'...
224 documents exctracted - 1.9KB  [211.5KB/s]
Done. [0.01s]

Isolate the abstracts


In [3]:
abstracts = prepare.get_abstracts(data)


Working on 4 core...
1.0KB/s on each of the [4] core
Done. [0.46s]

Cleaning, dumping the abstracts with errors, quick and dirty


In [35]:
def remove_err(datas,errs):
    err=sorted([item for subitem in errs for item in subitem],reverse=True)
    for e in err:
        for d in datas:
            del d[e]

In [36]:
remove_err([abstracts],prepare.get_errors(abstracts))

Replacing numbers with ##NB


In [37]:
abstracts = prepare.filter_numbers(abstracts)


Filtering numbers...
Done. [0.04s]

Creation of a tokenizer for a correct sentence splitting


In [38]:
tokenizer = prepare.create_sentence_tokenizer(abstracts)


Loading sentence tokenizer...
Done. [0.13s]

In [39]:
abstracts_labeled = prepare.ex_all_labels(abstracts,tokenizer)


Working on 4 core...
1.3KB/s on each of the [4] core
Done. [0.40s]

Lemmatization and special imports


In [40]:
lemmatized = lemmatize.lemm(abstracts_labeled)


Working on 4 core...
Splitting datas... Done. [0.02s]
Lemmatizing...
Done. [0min 20s]

In [41]:
tools.dump_pickle(lemmatized,"fast_lemmatized.pickle")


File already exist. Overwrite? [Y/N]
>Y
Dumping...
Done. [0.07s]

In [82]:
lemmatized = tools.load_pickle("data/corpus_lemmatized.pickle")


Loading 'data/corpus_lemmatized.pickle'...
Done. [1903.28s]

Label analysis

Does not affect the corpus


In [42]:
dic = analyze.create_dic_simple(lemmatized)


Copying corpus...Done. [0.03s]
Creating dictionary of labels...
Done. [0.00s]

In [44]:
print("Number of labels :",len(dic.keys()))
analyze.show_keys(dic,threshold=10)


Number of labels : 58
195______RESULTS
151______METHODS
146______BACKGROUND
117______CONCLUSIONS
91_______CONCLUSION
26_______INTRODUCTION
22_______OBJECTIVE
16_______MATERIALS AND METHODS
10_______OBJECTIVES
10_______PURPOSE
...
(48 other labels with less than 10 occurences)
...

In [45]:
primary_keyword=['AIM','BACKGROUND','INTRODUCTION','METHOD','RESULT','CONCLUSION','OBJECTIVE','DESIGN','FINDING','OUTCOME','PURPOSE']

In [46]:
analyze.regroup_keys(dic,primary_keyword)


Keys regrouped: 31

In [47]:
analyze.show_keys(dic,threshold=10)


212______CONCLUSION
200______RESULT
192______METHOD
149______BACKGROUND
33_______OBJECTIVE
26_______INTRODUCTION
10_______PURPOSE
...
(22 other labels with less than 10 occurences)
...

In [48]:
keys_to_replace = [['INTRODUCTION','CONTEXT'],
                   ['PURPOSE'],
                  ['AIM','SETTING'],
                  ['RESULT','FINDING','OUTCOME','DISCUSSION']]

replace_with =    ['BACKGROUND',
                   'OBJECTIVE',
                  'METHOD',
                  'CONCLUSION']

In [49]:
analyze.replace_keys(dic,keys_to_replace,replace_with)


Keys regplaced: 9

In [51]:
analyze.show_keys(dic,threshold=10)


392______METHOD
221______CONCLUSION
176______BACKGROUND
54_______OBJECTIVE
...
(16 other labels with less than 10 occurences)
...

Choosing labels


In [16]:
pattern = [
    ['BACKGROUND','BACKGROUNDS','OBJECTIVE','OBJECTIVES'],
    ['OBJECTIVE','OBJECTIVES','METHOD','METHODS'],
    ['METHOD','METHODS','RESULT','RESULTS'],
    ['RESULT','RESULTS','CONCLUSION','CONCLUSIONS'],
    ['CONCLUSION','CONCLUSIONS']
]

In [17]:
sub_perfect = analyze.get_exactly(lemmatized,pattern=pattern,no_truncate=False)


Selecting abstracts...
1038/2201 match the pattern (47%)
Done. [0.01s]

In [ ]:
sub_perfect = analyze.get_exactly(lemmatized,pattern=pattern,no_truncate=False)

In [18]:
print("%d abstracts labeled and ready for the next part!"%len(sub_perfect))


1038 abstracts labeled and ready for the next part!

Preparing the data for the classifier


In [83]:
dic = preprocess.create_dic(lemmatized,100)


Copying corpus...Done. [44.05s]
Creating dictionary of labels...
Done. [39.18s]

In [84]:
#primary_keyword=['AIM','BACKGROUND','METHOD','RESULT','CONCLUSION','OBJECTIVE','DESIGN','FINDINGS','OUTCOME','PURPOSE']
analyze.regroup_keys(dic,primary_keyword)


Keys regrouped: 2133

In [85]:
#keys_to_replace = [['INTRODUCTION','BACKGROUND','AIM','PURPOSE','CONTEXT'],
#                  ['CONCLUSION']]

#replace_with =    ['OBJECTIVE',
#                  'RESULT']

analyze.replace_keys(dic,keys_to_replace,replace_with)


Keys regplaced: 9

In [86]:
dic = {key:dic[key] for key in ['BACKGROUND','OBJECTIVE','METHOD','CONCLUSION']}

In [87]:
analyze.show_keys(dic,threshold=10)


947502___METHOD
542346___CONCLUSION
308942___OBJECTIVE
281004___BACKGROUND

In [88]:
print("Sentences per label :",["%s %d"%(s,len(dic[s][1])) for s in dic.keys()])


Sentences per label : ['OBJECTIVE 479326', 'METHOD 3623862', 'BACKGROUND 701814', 'CONCLUSION 1086843']

Creating train and test data


In [89]:
# classes to use a classifier onto
#classes_names=['BACKGROUND','METHOD','RESULT','CONCLUSION']
classes_names = dic.keys()
dic.keys()


Out[89]:
['OBJECTIVE', 'METHOD', 'BACKGROUND', 'CONCLUSION']

Reorder the labels according to your need, for better readability


In [90]:
classes_names = ['BACKGROUND', 'OBJECTIVE', 'METHOD', 'CONCLUSION']

In [91]:
# train/test split
split = 0.8

# truncate the number of abstracts to consider for each label,
# -1 to set to the maximum while keeping the number of sentences per labels equal

raw_x_train, raw_y_train, raw_x_test, raw_y_test = preprocess.split_data(dic,classes_names,
                                                              split_train_test=split,
                                                              truncate=-1)

Vectorizing


In [92]:
X_train, y_train, X_test, y_test, feature_names, max_features, vectorizer = preprocess.vectorize_data(raw_x_train, raw_y_train, raw_x_test, raw_y_test)


Vectorizing the training set...Done. [51.39s]
Getting features...Done. [0.42s]
Creating order...Done. [82.12s]
Done. [133.94s]

In [156]:
%xdel lemmatized
%xdel raw_x_train
%xdel raw_y_train
%xdel raw_x_test
%xdel raw_y_test


NameError: name 'lemmatized' is not defined
NameError: name 'raw_x_train' is not defined
NameError: name 'raw_y_train' is not defined
NameError: name 'raw_x_test' is not defined
NameError: name 'raw_y_test' is not defined

In [93]:
print("Number of features : %d"%(max_features))


Number of features : 180139

Training a neural network

imports

Adapt the data for a LSTM network


In [94]:
X_train, X_test, y_train, y_test = nnlstm.pad_sequence(X_train, X_test, y_train, y_test, maxlen=100)


Pading sequences...
X_train shape: (1533843, 100)
X_test shape: (383461, 100)
Done. [27.22s]

shortcut


In [95]:
tools.dump_pickle([X_train, y_train, X_test, y_test, feature_names, max_features, classes_names, vectorizer],"data/training_4_BacObjMetCon.pickle")


Dumping...
Done. [15.81s]

In [159]:
import gc
gc.collect()


Out[159]:
702

In [2]:
X_train, y_train, X_test, y_test, feature_names, max_features, classes_names, vectorizer = tools.load_pickle("data/training_4_BacObjMetCon.pickle")


Loading 'data/training_4_BacObjMetCon.pickle'...
Done. [4.96s]

Creating the network


In [3]:
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Reshape
from keras.layers.embeddings import Embedding
from keras.layers.recurrent import LSTM#, JZS1, GRU
from keras.optimizers import Adam, RMSprop

Need approximatly a minute to construct the network


In [58]:
%%time
dim_out = len(classes_names)

net = Sequential()
net.add(Embedding(max_features, 16))
net.add(LSTM(16, 16))
net.add(Dense(16, dim_out))
net.add(Dropout(0.5))
net.add(Activation('softmax'))
net.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")


CPU times: user 52.1 s, sys: 1.7 s, total: 53.8 s
Wall time: 55 s

In [21]:
%%time
dim_out = len(classes_names)

net2 = Sequential()
net2.add(Embedding(max_features, 8))
net2.add(LSTM(8, 8))
net2.add(Dense(8, dim_out))
net2.add(Activation('softmax'))
net2.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")


CPU times: user 50.1 s, sys: 508 ms, total: 50.6 s
Wall time: 51.7 s

In [101]:
%%time
dim_out = len(classes_names)

net3 = Sequential()
net3.add(Embedding(max_features, 128))
net3.add(LSTM(128, 64))
net3.add(Dropout(0.5))
net3.add(Dense(64, dim_out))
net3.add(Activation('softmax'))
net3.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")


CPU times: user 1min 1s, sys: 8.52 s, total: 1min 9s
Wall time: 1min 14s
/Library/Python/2.7/site-packages/theano/scan_module/scan_perform_ext.py:133: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility
  from scan_perform.scan_perform import *

In [24]:
%%time
dim_out = len(classes_names)

net4 = Sequential()
net4.add(Embedding(max_features, 32))
net4.add(JZS1(32, 32))
net4.add(Dropout(0.5))
net4.add(Dense(32, dim_out))
net4.add(Activation('softmax'))
net4.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")


CPU times: user 30.7 s, sys: 839 ms, total: 31.5 s
Wall time: 31.8 s

In [30]:
%%time
dim_out = len(classes_names)

net5 = Sequential()
net5.add(Embedding(max_features, 32))
net5.add(LSTM(32, 32))
net5.add(Dropout(0.5))
net5.add(Dense(32, dim_out))
net5.add(Activation('softmax'))
net5.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")


CPU times: user 54.2 s, sys: 574 ms, total: 54.8 s
Wall time: 55.1 s

In [47]:
%%time
dim_out = len(classes_names)

net5 = Sequential()
net5.add(Embedding(max_features, 32))
net5.add(LSTM(32, 32, return_sequences=True))
net5.add(LSTM(32, 32))
net5.add(Dropout(0.5))
net5.add(Dense(32, dim_out))
net5.add(Activation('softmax'))
net5.compile(loss='categorical_crossentropy', optimizer='adam', class_mode="categorical")

#rmsprop = RMSprop(lr=0.002, rho=0.9, epsilon=1e-6)
#adam = Adam(lr=0.002, beta_1=0.9, beta_2=0.999, epsilon=1e-8)
#batch size = 100
#50 epoch, decay by a 0.95 factor at each epoch after epoch 10
#two layers of LSTM


CPU times: user 2min 6s, sys: 1.56 s, total: 2min 7s
Wall time: 2min 9s

Training the network


In [6]:
print(len(X_train))
print(len(X_test))


1533843
383461

In [59]:
batch_size=100
b = 300000
b2 = 100000
length_train = 15000
length_test = 5000
nb_epoch = 10
history = train_network(net,
                               X_train[b:b+length_train],
                               y_train[b:b+length_train],
                               X_test[b2:b2+length_test],
                               y_test[b2:b2+length_test],
                               nb_epoch,
                               batch_size=batch_size,
                               path_save="weights",
                               patience=2) # when to apply early stopping if necessary


Training...
Loading 'dirty_ac_stack.pickle'...
Done. [0.04s]
Loading 'dirty_ac_true.pickle'...
Done. [0.09s]
Train on 15000 samples, validate on 5000 samples
Epoch 0
15000/15000 [==============================] - 25s - loss: 1.2393 - acc: 0.3841 - val_loss: 1.0450 - val_acc: 0.5374
Saving at first epoch
Eval ext... Accuracy: 40% [854/2141], RPS: 0.541.   Done [8.46s]
Epoch 1
15000/15000 [==============================] - 23s - loss: 1.0832 - acc: 0.4609 - val_loss: 0.9411 - val_acc: 0.6842
Model improved, saving weight
Eval ext... Accuracy: 47% [1015/2141], RPS: 0.596.   Done [8.22s]
Epoch 2
15000/15000 [==============================] - 24s - loss: 1.0082 - acc: 0.5029 - val_loss: 0.8548 - val_acc: 0.7216
Model improved, saving weight
Eval ext... Accuracy: 54% [1148/2141], RPS: 0.643.   Done [7.96s]
Epoch 3
15000/15000 [==============================] - 24s - loss: 0.9493 - acc: 0.5263 - val_loss: 0.7833 - val_acc: 0.7136
Eval ext... Accuracy: 53% [1141/2141], RPS: 0.640.   Done [7.88s]
Epoch 4
15000/15000 [==============================] - 24s - loss: 0.9043 - acc: 0.5387 - val_loss: 0.7393 - val_acc: 0.7268
Model improved, saving weight
Eval ext... Accuracy: 52% [1124/2141], RPS: 0.633.   Done [8.07s]
Epoch 5
15000/15000 [==============================] - 24s - loss: 0.8681 - acc: 0.5490 - val_loss: 0.6981 - val_acc: 0.7342
Model improved, saving weight
Eval ext... Accuracy: 53% [1142/2141], RPS: 0.640.   Done [8.02s]
Epoch 6
15000/15000 [==============================] - 24s - loss: 0.8367 - acc: 0.5520 - val_loss: 0.6690 - val_acc: 0.7376
Model improved, saving weight
Eval ext... Accuracy: 54% [1150/2141], RPS: 0.644.   Done [7.92s]
Epoch 7
15000/15000 [==============================] - 24s - loss: 0.8196 - acc: 0.5526 - val_loss: 0.6504 - val_acc: 0.7462
Model improved, saving weight
Eval ext... Accuracy: 52% [1123/2141], RPS: 0.635.   Done [8.00s]
Epoch 8
15000/15000 [==============================] - 24s - loss: 0.7956 - acc: 0.5587 - val_loss: 0.6351 - val_acc: 0.7482
Model improved, saving weight
Eval ext... Accuracy: 53% [1130/2141], RPS: 0.637.   Done [8.35s]
Epoch 9
15000/15000 [==============================] - 26s - loss: 0.7886 - acc: 0.5569 - val_loss: 0.6441 - val_acc: 0.7448
Eval ext... Accuracy: 53% [1142/2141], RPS: 0.641.   Done [10.14s]
Couldn't save, re-trying. Error: <class '__main__.LossKeepIncreasing'>
Done. [332.38s]

In [69]:
batch_size=100
b = 0
b2 = 0
length_train = 800000
length_test = 10000
nb_epoch = 20
history = train_network(net,
                               X_train[b:b+length_train],
                               y_train[b:b+length_train],
                               X_test[b2:b2+length_test],
                               y_test[b2:b2+length_test],
                               nb_epoch,
                               batch_size=batch_size,
                               path_save="weights",
                               patience=3) # when to apply early stopping if necessary


Training...
Loading 'dirty_ac_stack.pickle'...
Done. [0.04s]
Loading 'dirty_ac_true.pickle'...
Done. [0.10s]
Train on 800000 samples, validate on 10000 samples
Epoch 0
800000/800000 [==============================] - 1411s - loss: 0.8142 - acc: 0.5470 - val_loss: 0.4866 - val_acc: 0.8040
Saving at first epoch
Eval ext... Accuracy: 60% [1275/2141], RPS: 0.688.   Done [8.06s]
Epoch 1
800000/800000 [==============================] - 1863s - loss: 0.7671 - acc: 0.5782 - val_loss: 0.4495 - val_acc: 0.8097
Model improved, saving weight
Eval ext... Accuracy: 61% [1314/2141], RPS: 0.703.   Done [10.51s]
Epoch 2
800000/800000 [==============================] - 1965s - loss: 0.7469 - acc: 0.5883 - val_loss: 0.4398 - val_acc: 0.8111
Model improved, saving weight
Eval ext... Accuracy: 61% [1301/2141], RPS: 0.698.   Done [8.25s]
Epoch 3
800000/800000 [==============================] - 1977s - loss: 0.7317 - acc: 0.5956 - val_loss: 0.4331 - val_acc: 0.8121
Model improved, saving weight
Eval ext... Accuracy: 61% [1300/2141], RPS: 0.698.   Done [11.77s]
Epoch 4
800000/800000 [==============================] - 1857s - loss: 0.7204 - acc: 0.6024 - val_loss: 0.4294 - val_acc: 0.8148
Model improved, saving weight
Eval ext... Accuracy: 61% [1297/2141], RPS: 0.697.   Done [8.64s]
Epoch 5
800000/800000 [==============================] - 2001s - loss: 0.7098 - acc: 0.6075 - val_loss: 0.4253 - val_acc: 0.8136
Eval ext... Accuracy: 61% [1300/2141], RPS: 0.697.   Done [13.24s]
Epoch 6
800000/800000 [==============================] - 1980s - loss: 0.7031 - acc: 0.6104 - val_loss: 0.4227 - val_acc: 0.8134
Eval ext... Accuracy: 62% [1325/2141], RPS: 0.706.   Done [10.18s]
Epoch 7
800000/800000 [==============================] - 1940s - loss: 0.6953 - acc: 0.6144 - val_loss: 0.4240 - val_acc: 0.8112
Eval ext... Accuracy: 61% [1310/2141], RPS: 0.701.   Done [9.94s]
Couldn't save, re-trying. Error: <class '__main__.LossKeepIncreasing'>
Epoch 8
101800/800000 [==>...........................] - ETA: 1697s - loss: 0.6843 - acc: 0.6220
---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-69-99d7b41d6c7e> in <module>()
     13                                batch_size=batch_size,
     14                                path_save="weights",
---> 15                                patience=3) # when to apply early stopping if necessary

<ipython-input-25-4715c036bbf2> in train_network(network, X_train, y_train, X_test, y_test, epoch, batch_size, path_save, patience)
    109     try:
    110         network.fit(X_train, y_train, batch_size=batch_size, nb_epoch=epoch,
--> 111                     validation_data=(X_test, y_test), show_accuracy=True, callbacks=[history])#,earlystop])
    112     except LossKeepIncreasing:
    113         print("Accuracy keep decreasing, stopping early.")

/Library/Python/2.7/site-packages/Keras-0.1.2-py2.7.egg/keras/models.pyc in fit(self, X, y, batch_size, nb_epoch, verbose, callbacks, validation_split, validation_data, shuffle, show_accuracy, class_weight, sample_weight)
    463                          verbose=verbose, callbacks=callbacks,
    464                          validation_split=validation_split, val_f=val_f, val_ins=val_ins,
--> 465                          shuffle=shuffle, metrics=metrics)
    466 
    467     def predict(self, X, batch_size=128, verbose=0):

/Library/Python/2.7/site-packages/Keras-0.1.2-py2.7.egg/keras/models.pyc in _fit(self, f, ins, out_labels, batch_size, nb_epoch, verbose, callbacks, validation_split, val_f, val_ins, shuffle, metrics)
    206                 batch_logs['size'] = len(batch_ids)
    207                 callbacks.on_batch_begin(batch_index, batch_logs)
--> 208                 outs = f(*ins_batch)
    209                 if type(outs) != list:
    210                     outs = [outs]

/Library/Python/2.7/site-packages/theano/compile/function_module.pyc in __call__(self, *args, **kwargs)
    593         t0_fn = time.time()
    594         try:
--> 595             outputs = self.fn()
    596         except Exception:
    597             if hasattr(self.fn, 'position_of_error'):

KeyboardInterrupt: 

In [25]:
from keras.callbacks import *
class LossKeepIncreasing(Exception):
    pass

def train_network(network,
                  X_train,y_train,X_test,y_test,
                  epoch,
                  batch_size=64,path_save="weights",patience=1):

    t0 = time.time()
    print("Training...")
    sys.stdout.flush()

    if not os.path.exists(path_save):
        os.makedirs(path_save)
         
    ac_stack = tools.load_pickle("dirty_ac_stack.pickle")
    ac_true = tools.load_pickle("dirty_ac_true.pickle")
    
    def _local_evaluate(n_plain_t,n_plain_p):
        c = 0
        for idx,i in enumerate(n_plain_p):
            isit=False
            for idx2,x in enumerate(i):
                if x==1 and x==n_plain_t[idx][idx2]:
                    isit=True
            if isit:
                c+=1
        acc = float(c)/len(n_plain_p)
        rps = metrics.label_ranking_average_precision_score(n_plain_t,n_plain_p)
        print("\x1b[33mAccuracy: %.02f%%\x1b[0m [%d/%d], \x1b[33mRPS: %.03f\x1b[0m"%(acc*100,c,len(n_plain_p),
                                        rps),end="")
        return acc,rps

    class LossHistory(Callback):
        def on_train_begin(self, logs={}):
            self.losses = []
            self.accuracy = []
            self.val_losses = []
            self.val_accuracy = []
            self.ext_accuracy = []
            self.ext_rps = []
            self.metric = []
            self.file_name = []
            self.pos = 0

        def on_batch_end(self, batch, logs={}):
            self.losses.append(logs.get('loss'))
            self.accuracy.append(logs.get('acc'))

        def on_epoch_end(self, epoch, logs={}):
            try:
                self.val_losses.append(logs.get('val_loss'))
                self.val_accuracy.append(logs.get('val_acc'))
                self.metric.append(self.val_accuracy[-1]-(self.val_losses[-1]/10.))
                if len(self.val_accuracy)<2:
                    #network.save_weights("weights/weight_%d.hdf5"%self.pos,overwrite=True)
                    print("\x1b[35mSaving at first epoch\x1b[0m")
                else:
                    tmp = True
                    for i in self.metric[:-1]:
                        if self.metric[-1]<i:
                            tmp = False
                            break
                    if tmp:
                        network.save_weights("%s/best.hdf5"%path_save,overwrite=True)
                        print("\x1b[35mModel improved, saving weight\x1b[0m")
                network.save_weights("%s/epoch_%d.hdf5"%(path_save,self.pos),overwrite=True)

                #evaluate on other corpus
                tx = time.time()
                print("Eval ext... ",end="")
                sys.stdout.flush()
                nn_pred = LSTMPredictor(network,vectorizer,classes_names)
                pred_label=[]
                for idx,x in enumerate(ac_stack):
                    pred_label.append(nn_pred.silence_predict_on_csv(x))
                    tmp = []
                ac_pred_label = []
                for i in pred_label:
                    for j in i:
                        ac_pred_label.append(j)
                acc,rps = _local_evaluate(ac_true,ac_pred_label)
                self.ext_accuracy.append(acc)
                self.ext_rps.append(rps)
                print(".   Done [%.02fs]"%(time.time()-tx))

                self.pos=self.pos+1

                cpt = 0
                if len(self.val_accuracy)>1:
                    for i in self.metric[-(patience+1):-1]:
                        if self.metric[-1]<i:
                            cpt += 1
                if patience == cpt:
                    raise LossKeepIncreasing
            except:
                e = sys.exc_info()[0]
                print("Couldn't log, re-trying. Error: %s"%e)
                try:
                    network.save_weights("%s/epoch_%d.hdf5"%(path_save,self.pos),overwrite=True)
                    self.pos=self.pos+1
                except:
                    e = sys.exc_info()[0]
                    print("Hum... Couldn't save nether. Error: %s"%e)

    history = LossHistory()

    try:
        network.fit(X_train, y_train, batch_size=batch_size, nb_epoch=epoch,
                    validation_data=(X_test, y_test), show_accuracy=True, callbacks=[history])#,earlystop])
    except LossKeepIncreasing:
        print("Accuracy keep decreasing, stopping early.")
    #network.load_weights("%s/best.hdf5"%path_save)
    print("Done. [%.02fs]"%(time.time()-t0))
    return history

In [106]:
#net.load_weights("weights/epoch_6.hdf5")
#net.load_weights("weights/best.hdf5")

net.save_weights("weights/val_062_16_16-16_16_800000.hdf5")
#net.save_weights("weights/best_090_16_16-16_16_800000.hdf5")
#net.load_weights("weights/epoch_6.hdf5")

Evaluate the network


In [61]:
#enought data, dropout more!
nnlstm.show_history(history)



In [105]:
nnlstm.evaluate_network(net, X_test, y_test, classes_names, length=-1)


No decision: 0 / 383460  [0.00%]0 0
Accuracy: 0.901869
             precision    recall  f1-score   support

 BACKGROUND       0.74      0.66      0.70    108779
  OBJECTIVE       0.59      0.71      0.64     80227
     METHOD       0.93      0.90      0.91     98710
 CONCLUSION       0.99      0.99      0.99     95744

avg / total       0.82      0.81      0.81    383460

Confusion matrix:
[[71415 33954  3225   185]
 [20447 56586  3063   131]
 [ 4187  5070 88955   498]
 [   60   515   604 94565]]

In [113]:
#net.load_weights('weights/best.hdf5')
nnlstm.evaluate_network(net, X_test, y_test, classes_names, length=length_test)


No decision: 0 / 5000  [0.00%]0 0
Accuracy: 0.897933
             precision    recall  f1-score   support

 BACKGROUND       0.64      0.68      0.66      1183
  OBJECTIVE       0.65      0.66      0.66      1253
     METHOD       0.94      0.88      0.91      1314
 CONCLUSION       0.99      0.99      0.99      1250

avg / total       0.81      0.81      0.81      5000

Confusion matrix:
[[ 799  354   28    2]
 [ 382  827   39    5]
 [  64   78 1161   11]
 [   1    5    2 1242]]

Predict on a new corpus


In [107]:
predictor = nnlstm.LSTMPredictor(net3,vectorizer,classes_names,len_graph=20)

In [108]:
tokenizer = tools.load_pickle("data/tokenizer.pickle")


Loading 'data/tokenizer.pickle'...
Done. [0.12s]

In [636]:
import random

In [639]:
rc =  random.choice(lemmatized)
for i in rc:
    for j in classes_names:
        if i[0].rfind(j) != -1:
            i[0] = j
predictor.predict_labeled(rc)


to detect the occurrence of low susceptibility to colistin ( polymyxin e ) a last-resort antimicrobial among enterobacteria isolate from sample of animal origin ( poultry and swine ) and to find out the molecular basis of colistin resistance

BACKGROUND |0.213|****
OBJECTIVE  |0.782|**************** [true label][predicted label]
METHOD     |0.003|
RESULT     |0.001|
CONCLUSION |0.001|
________________________________________________________________________________

salmonella enterica and escherichia coli be isolate from egg and swine sample

BACKGROUND |0.351|*******
OBJECTIVE  |0.595|************ [predicted label]
METHOD     |0.046|* [true label]
RESULT     |0.004|
CONCLUSION |0.004|
________________________________________________________________________________

bacterial strain be screen for colistin resistance by use mic determination interpret accord to eucast recommendation

BACKGROUND |0.477|********** [predicted label]
OBJECTIVE  |0.263|*****
METHOD     |0.187|**** [true label]
RESULT     |0.027|*
CONCLUSION |0.047|*
________________________________________________________________________________

pmrab gene be amplify by pcr from bacterial isolates and their sequence be characterize

BACKGROUND |0.167|***
OBJECTIVE  |0.183|****
METHOD     |0.582|************ [true label][predicted label]
RESULT     |0.051|*
CONCLUSION |0.017|
________________________________________________________________________________

nine colistin-resistant strain be detect in a collection of nb enterobacteria ( s. enterica and e. coli ) isolate from animal sample take in different environment

BACKGROUND |0.019|
OBJECTIVE  |0.033|*
METHOD     |0.473|********* [predicted label]
RESULT     |0.457|********* [true label]
CONCLUSION |0.019|
________________________________________________________________________________

sequence encode the pmrab two-component sensor-regulator from two colistin-resistant e. coli strain isolate from swine faeces present three non-synonymous polymorphism produce the variant nbs → i and nbr → s of pmra and nbv → g of pmrb among which the involvement of mutation in pmra- nb and pmrb- nb in resistance to the antimicrobial have be previously show

BACKGROUND |0.013|
OBJECTIVE  |0.023|
METHOD     |0.025|*
RESULT     |0.696|************** [true label][predicted label]
CONCLUSION |0.244|*****
________________________________________________________________________________

no variation at the protein level be detect after analysis of pmrab sequence from seven colistin-resistant s. enterica strain

BACKGROUND |0.007|
OBJECTIVE  |0.010|
METHOD     |0.018|
RESULT     |0.672|************* [true label][predicted label]
CONCLUSION |0.293|******
________________________________________________________________________________

e. coli strain carry mutation in pmrab that confer resistance to polymyxin which might have evolve in vivo and have be rarely detect be describe for the first time in enterobacteria isolate from animal

BACKGROUND |0.001|
OBJECTIVE  |0.002|
METHOD     |0.001|
RESULT     |0.007|
CONCLUSION |0.989|******************** [true label][predicted label]
________________________________________________________________________________





In [52]:
model_list = tools.exctract_models()


Model ready: rf
Model ready: svc

In [53]:
models = tools.load_models()#models=models)


. models/rf
├── Loading classifier 'rf'...
├── Done. [3.54s]
├── Loading vectorizer 'rf'...
└── Done. [17.14s]
. models/svc
├── Loading classifier 'svc'...
├── Done. [0.12s]
├── Loading vectorizer 'svc'...
└── Done. [53.36s]

In [134]:
class RFPredictor:

    def __init__(self,network,vectorizer,classes_names,nb_index=100,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        d = {}
        _color=[1,2,3,5,6,7]
        for idx,i in enumerate(classes_names):
            d[i]=_color[idx%len(_color)]
        self.colors = d
        self.nb_index = nb_index
        self.len_graph = len_graph
        Word("test")

    def _draw_pred(self,predicted,true_label,proba):
        m_len = np.array([len(i) for i in self.classes_names]).max()
        for idx,i in enumerate(self.classes_names):
            s = i.ljust(m_len+1)
            p = proba[idx]
            pad = '*'*int(round(p*self.len_graph))
            if len(pad)>(self.len_graph*2):
                pad='*'*(self.len_graph*2)
            if self.classes_names[idx] == predicted == true_label:
                print("\x1b[42m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[32m[true label][predicted label]\x1b[0m"%(s,p,pad))
            elif self.classes_names[idx] == predicted:
                print("\x1b[45m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[35m[predicted label]\x1b[0m"%(s,p,pad))
            elif self.classes_names[idx] == true_label:
                print("\x1b[43m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[33m[true label]\x1b[0m"%(s,p,pad))
            else:
                print("%s|\x1b[37m%.03f\x1b[0m|\x1b[37m%s\x1b[0m"%(s,p,pad))

    def get_prediction(self,text,true_label):
        corr = self.classes_names
        tt = self.vect.transform([text])

        a = self.network.predict_proba(tt)
        c = a.max()

        self._draw_pred(self.classes_names[a.argmax()],true_label,a[0])
        return c,corr[a.argmax()]

    def predict_labeled(self,lab):
        cc=0
        d=self.colors
        for i in lab:
            cpt=0.0
            for x in lab:
                cpt+=len(x[1])
            tmp=[]
            for smt in i[1]:
                tmp.append("##IDX%s %s"%(str(int((cc/cpt)*self.nb_index)),smt))
                cc+=1
            for j in tmp:
                print("%s\n"%(j[7:]))
                confidence,predd = self.get_prediction(j,i[0])
                print('_'*80)
                print()

In [144]:
class SVCPredictor:

    def __init__(self,network,vectorizer,classes_names,nb_index=100,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        d = {}
        _color=[1,2,3,5,6,7]
        for idx,i in enumerate(classes_names):
            d[i]=_color[idx%len(_color)]
        self.colors = d
        self.nb_index = nb_index
        self.len_graph = len_graph
        Word("test")

    def _draw_pred(self,predicted,true_label,proba):
        m_len = np.array([len(i) for i in self.classes_names]).max()
        for idx,i in enumerate(self.classes_names):
            s = i.ljust(m_len+1)
            p = proba[idx]
            pad = '*'*int(round(p*self.len_graph))
            if len(pad)>(self.len_graph*2):
                pad='*'*(self.len_graph*2)
            if self.classes_names[idx] == predicted == true_label:
                print("\x1b[42m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[32m[true label][predicted label]\x1b[0m"%(s,p,pad))
            elif self.classes_names[idx] == predicted:
                print("\x1b[45m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[35m[predicted label]\x1b[0m"%(s,p,pad))
            elif self.classes_names[idx] == true_label:
                print("\x1b[43m%s\x1b[0m|\x1b[37m%.03f\x1b[0m|%s \x1b[33m[true label]\x1b[0m"%(s,p,pad))
            else:
                print("%s|\x1b[37m%.03f\x1b[0m|\x1b[37m%s\x1b[0m"%(s,p,pad))
                
    def _except_draw_pred(self,predicted,true_label):
        m_len = np.array([len(i) for i in self.classes_names]).max()
        for idx,i in enumerate(self.classes_names):
            s = i.ljust(m_len+1)
            if self.classes_names[idx] == predicted == true_label:
                print("\x1b[42m%s\x1b[0m| \x1b[32m[true label][predicted label]\x1b[0m"%(s))
            elif self.classes_names[idx] == predicted:
                print("\x1b[45m%s\x1b[0m| \x1b[35m[predicted label]\x1b[0m"%(s))
            elif self.classes_names[idx] == true_label:
                print("\x1b[43m%s\x1b[0m| \x1b[33m[true label]\x1b[0m"%(s))
            else:
                print("%s|"%(s))

    def get_prediction(self,text,true_label):
        corr = self.classes_names
        tt = self.vect.transform([text])

        a = self.network.decision_function(tt)
        c = a.max()-a.mean()

        self._draw_pred(self.classes_names[a.argmax()],true_label,a[0])
        return c,corr[a.argmax()]

    def predict_labeled(self,lab):
        cc=0
        d=self.colors
        for i in lab:
            cpt=0.0
            for x in lab:
                cpt+=len(x[1])
            tmp=[]
            for smt in i[1]:
                tmp.append("##IDX%s %s"%(str(int((cc/cpt)*self.nb_index)),smt))
                cc+=1
            for j in tmp:
                print("%s\n"%(j[7:]))
                confidence,predd = self.get_prediction(j,i[0])
                print('_'*80)
                print()

In [153]:
class oth_Predictor:

    def __init__(self,network,vectorizer,classes_names,nb_index=100,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        d = {}
        _color=[1,2,3,5,6,7]
        for idx,i in enumerate(classes_names):
            d[i]=_color[idx%len(_color)]
        self.colors = d
        self.nb_index = nb_index
        self.len_graph = len_graph
        Word("test")

    def _draw_pred(self,predicted,true_label):
        m_len = np.array([len(i) for i in self.classes_names]).max()
        for idx,i in enumerate(self.classes_names):
            s = i.ljust(m_len+1)
            if self.classes_names[idx] == predicted == true_label:
                print("\x1b[42m%s\x1b[0m| \x1b[32m[true label][predicted label]\x1b[0m"%(s))
            elif self.classes_names[idx] == predicted:
                print("\x1b[45m%s\x1b[0m| \x1b[35m[predicted label]\x1b[0m"%(s))
            elif self.classes_names[idx] == true_label:
                print("\x1b[43m%s\x1b[0m| \x1b[33m[true label]\x1b[0m"%(s))
            else:
                print("%s|"%(s))

    def get_prediction(self,text,true_label):
        tt = self.vect.transform([text])

        self._draw_pred(self.classes_names[self.network.predict(tt)[0]] , true_label)
        return 0, self.classes_names[self.network.predict(tt)[0]]


    def predict_labeled(self,lab):
        cc=0
        d=self.colors
        for i in lab:
            cpt=0.0
            for x in lab:
                cpt+=len(x[1])
            tmp=[]
            for smt in i[1]:
                tmp.append("##IDX%s %s"%(str(int((cc/cpt)*self.nb_index)),smt))
                cc+=1
            for j in tmp:
                print("%s\n"%(j[7:]))
                confidence,predd = self.get_prediction(j,i[0])
                print('_'*80)
                print()

In [13]:
tknz = tools.load_pickle("data/tokenizer.pickle")


Loading 'data/tokenizer.pickle'...
Done. [0.11s]

In [106]:
out = nnlstm.get_oth_lab(oold("d6"),tokenizer)

In [23]:
from textblob import Blobber
from textblob_aptagger import PerceptronTagger
from textblob import Word

In [158]:
net_pred = nnlstm.LSTMPredictor(net,vectorizer,classes_names,len_graph=20)

rf_pred = RFPredictor(models["clf_rf"],models["vectorizer_rf"],classes_names,nb_index=10,len_graph=20)
svc_pred = SVCPredictor(models["clf_svc"],models["vectorizer_svc"],classes_names,nb_index=10,len_graph=20)
rb_pred = oth_Predictor(models["clf_bn"],models["vectorizer_bn"],classes_names,nb_index=10,len_graph=20)
sgd_pred = oth_Predictor(models["clf_sgd"],models["vectorizer_sgd"],classes_names,nb_index=10,len_graph=20)

In [334]:
%%time
net_pred.predict_labeled(out)


In this study we investigate the merits of fast approximate string matching to address challenges relating to spelling variants and to utilise large-scale lexical resources for semantic class disambiguation. 

BACKGROUND |0.982|******************** [true label][predicted label]
METHOD     |0.008|
RESULT     |0.002|
CONCLUSION |0.008|
________________________________________________________________________________

We integrate string matching results into machine learning-based disambiguation through the use of a novel set of features that represent the distance of a given textual span to the closest match in each of a collection of lexical resources.

BACKGROUND |0.985|******************** [predicted label]
METHOD     |0.005| [true label]
RESULT     |0.002|
CONCLUSION |0.008|
________________________________________________________________________________

We collect lexical resources for a multitude of semantic categories from a variety of biomedical domain sources.

BACKGROUND |0.288|******
METHOD     |0.456|********* [true label][predicted label]
RESULT     |0.170|***
CONCLUSION |0.085|**
________________________________________________________________________________

The combined resources, containing more than twenty million lexical items, are queried using a recently proposed fast and efficient approximate string matching algorithm that allows us to query large resources without severely impacting system performance. 

BACKGROUND |0.098|**
METHOD     |0.870|***************** [true label][predicted label]
RESULT     |0.004|
CONCLUSION |0.028|*
________________________________________________________________________________

We evaluate our results on six corpora representing a variety of disambiguation tasks.

BACKGROUND |0.124|**
METHOD     |0.448|********* [predicted label]
RESULT     |0.350|******* [true label]
CONCLUSION |0.078|**
________________________________________________________________________________

While the integration of approximate string matching features is shown to substantially improve performance on one corpus, results are modest or negative for others. 

BACKGROUND |0.272|*****
METHOD     |0.337|******* [predicted label]
RESULT     |0.132|*** [true label]
CONCLUSION |0.259|*****
________________________________________________________________________________

We suggest possible explanations and future research directions. 

BACKGROUND |0.436|*********
METHOD     |0.075|*
RESULT     |0.021|
CONCLUSION |0.468|********* [true label][predicted label]
________________________________________________________________________________

CPU times: user 139 ms, sys: 34 ms, total: 173 ms
Wall time: 117 ms

In [161]:
%%time
rf_pred.predict_labeled(out)


In this study we investigate the merits of fast approximate string matching to address challenges relating to spelling variants and to utilise large-scale lexical resources for semantic class disambiguation. 

BACKGROUND |0.980|******************** [true label][predicted label]
METHOD     |0.020|
RESULT     |0.000|
CONCLUSION |0.000|
________________________________________________________________________________

We integrate string matching results into machine learning-based disambiguation through the use of a novel set of features that represent the distance of a given textual span to the closest match in each of a collection of lexical resources.

BACKGROUND |0.940|******************* [predicted label]
METHOD     |0.040|* [true label]
RESULT     |0.000|
CONCLUSION |0.020|
________________________________________________________________________________

We collect lexical resources for a multitude of semantic categories from a variety of biomedical domain sources.

BACKGROUND |0.140|***
METHOD     |0.800|**************** [true label][predicted label]
RESULT     |0.060|*
CONCLUSION |0.000|
________________________________________________________________________________

The combined resources, containing more than twenty million lexical items, are queried using a recently proposed fast and efficient approximate string matching algorithm that allows us to query large resources without severely impacting system performance. 

BACKGROUND |0.140|***
METHOD     |0.760|*************** [true label][predicted label]
RESULT     |0.080|**
CONCLUSION |0.020|
________________________________________________________________________________

We evaluate our results on six corpora representing a variety of disambiguation tasks.

BACKGROUND |0.040|*
METHOD     |0.760|*************** [predicted label]
RESULT     |0.200|**** [true label]
CONCLUSION |0.000|
________________________________________________________________________________

While the integration of approximate string matching features is shown to substantially improve performance on one corpus, results are modest or negative for others. 

BACKGROUND |0.020|
METHOD     |0.000|
RESULT     |0.380|******** [true label]
CONCLUSION |0.600|************ [predicted label]
________________________________________________________________________________

We suggest possible explanations and future research directions. 

BACKGROUND |0.000|
METHOD     |0.000|
RESULT     |0.000|
CONCLUSION |1.000|******************** [true label][predicted label]
________________________________________________________________________________

CPU times: user 1.55 s, sys: 949 ms, total: 2.49 s
Wall time: 3.47 s

In [162]:
%%time
svc_pred.predict_labeled(out)


In this study we investigate the merits of fast approximate string matching to address challenges relating to spelling variants and to utilise large-scale lexical resources for semantic class disambiguation. 

BACKGROUND |1.466|***************************** [true label][predicted label]
METHOD     |-1.209|
RESULT     |-2.084|
CONCLUSION |-2.797|
________________________________________________________________________________

We integrate string matching results into machine learning-based disambiguation through the use of a novel set of features that represent the distance of a given textual span to the closest match in each of a collection of lexical resources.

BACKGROUND |-0.303|
METHOD     |0.680|************** [true label][predicted label]
RESULT     |-1.775|
CONCLUSION |-1.833|
________________________________________________________________________________

We collect lexical resources for a multitude of semantic categories from a variety of biomedical domain sources.

BACKGROUND |-0.467|
METHOD     |-0.141| [true label][predicted label]
RESULT     |-0.638|
CONCLUSION |-2.257|
________________________________________________________________________________

The combined resources, containing more than twenty million lexical items, are queried using a recently proposed fast and efficient approximate string matching algorithm that allows us to query large resources without severely impacting system performance. 

BACKGROUND |-0.575|
METHOD     |-0.445| [true label]
RESULT     |-0.274| [predicted label]
CONCLUSION |-1.207|
________________________________________________________________________________

We evaluate our results on six corpora representing a variety of disambiguation tasks.

BACKGROUND |-2.239|
METHOD     |-0.174| [predicted label]
RESULT     |-0.500| [true label]
CONCLUSION |-1.904|
________________________________________________________________________________

While the integration of approximate string matching features is shown to substantially improve performance on one corpus, results are modest or negative for others. 

BACKGROUND |-1.945|
METHOD     |-2.182|
RESULT     |-0.359| [true label]
CONCLUSION |0.281|****** [predicted label]
________________________________________________________________________________

We suggest possible explanations and future research directions. 

BACKGROUND |-3.621|
METHOD     |-4.377|
RESULT     |-1.792|
CONCLUSION |2.145|**************************************** [true label][predicted label]
________________________________________________________________________________

CPU times: user 831 ms, sys: 389 ms, total: 1.22 s
Wall time: 1.27 s

In [163]:
%%time
rb_pred.predict_labeled(out)


In this study we investigate the merits of fast approximate string matching to address challenges relating to spelling variants and to utilise large-scale lexical resources for semantic class disambiguation. 

BACKGROUND | [true label][predicted label]
METHOD     |
RESULT     |
CONCLUSION |
________________________________________________________________________________

We integrate string matching results into machine learning-based disambiguation through the use of a novel set of features that represent the distance of a given textual span to the closest match in each of a collection of lexical resources.

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

We collect lexical resources for a multitude of semantic categories from a variety of biomedical domain sources.

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

The combined resources, containing more than twenty million lexical items, are queried using a recently proposed fast and efficient approximate string matching algorithm that allows us to query large resources without severely impacting system performance. 

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

We evaluate our results on six corpora representing a variety of disambiguation tasks.

BACKGROUND |
METHOD     | [predicted label]
RESULT     | [true label]
CONCLUSION |
________________________________________________________________________________

While the integration of approximate string matching features is shown to substantially improve performance on one corpus, results are modest or negative for others. 

BACKGROUND |
METHOD     |
RESULT     | [true label]
CONCLUSION | [predicted label]
________________________________________________________________________________

We suggest possible explanations and future research directions. 

BACKGROUND |
METHOD     |
RESULT     |
CONCLUSION | [true label][predicted label]
________________________________________________________________________________

CPU times: user 4.59 s, sys: 1.49 s, total: 6.08 s
Wall time: 6.15 s

In [164]:
%%time
sgd_pred.predict_labeled(out)


In this study we investigate the merits of fast approximate string matching to address challenges relating to spelling variants and to utilise large-scale lexical resources for semantic class disambiguation. 

BACKGROUND | [true label]
METHOD     | [predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

We integrate string matching results into machine learning-based disambiguation through the use of a novel set of features that represent the distance of a given textual span to the closest match in each of a collection of lexical resources.

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

We collect lexical resources for a multitude of semantic categories from a variety of biomedical domain sources.

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

The combined resources, containing more than twenty million lexical items, are queried using a recently proposed fast and efficient approximate string matching algorithm that allows us to query large resources without severely impacting system performance. 

BACKGROUND |
METHOD     | [true label][predicted label]
RESULT     |
CONCLUSION |
________________________________________________________________________________

We evaluate our results on six corpora representing a variety of disambiguation tasks.

BACKGROUND |
METHOD     | [predicted label]
RESULT     | [true label]
CONCLUSION |
________________________________________________________________________________

While the integration of approximate string matching features is shown to substantially improve performance on one corpus, results are modest or negative for others. 

BACKGROUND |
METHOD     |
RESULT     | [true label]
CONCLUSION | [predicted label]
________________________________________________________________________________

We suggest possible explanations and future research directions. 

BACKGROUND |
METHOD     |
RESULT     |
CONCLUSION | [true label][predicted label]
________________________________________________________________________________

CPU times: user 4.76 s, sys: 1.46 s, total: 6.22 s
Wall time: 6.35 s




In [74]:
import pandas as pd
import sys
from IPython.display import clear_output

from os import listdir
from os.path import isfile, join

In [75]:
from sklearn.metrics import confusion_matrix
from sklearn import metrics
import matplotlib.pyplot as plt

from textblob import Blobber
from textblob_aptagger import PerceptronTagger
from textblob import Word

import numpy as np
import sys
import codecs
import re
import multiprocessing
import pickle
import copy
import time
import random
import os

import seaborn as sns

In [76]:
class LSTMPredictor:
    def __init__(self,network,vectorizer,classes_names,nb_index=100,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        self.nb_index = nb_index
        self.len_graph = len_graph
        
    def _vect_label(self,n):
        tmp = np.zeros(len(self.classes_names))
        tmp[n] = 1
        return tmp
    
    def silence_get_prediction(self,sent):
        tag = self.tagger(sent[24:].encode("utf8").lower()).tags
        ph_out=[]
        for i in tag:
            if i[1][0]=='V':
                ph_out.append(Word(i[0]).lemmatize('v'))
            elif i[1][0]=='N':
                ph_out.append(Word(i[0]).lemmatize('n'))
            else:
                ph_out.append(i[0])
        find = r'[0-9]+\.[0-9]+|[0-9]+,[0-9]+|[0-9]+'
        res = re.sub(find,r'##NB'," ".join(ph_out))
        ph_out=res.split()
        l = [sent[0:7].lower(),sent[8:15].lower(),sent[16:23].lower()]
        l.extend(ph_out)
        x = []
        for i in l:
            try:
                x.append(self.vect.vocabulary_[i])
            except KeyError:
                pass
        x = np.array([x])

        tmp=self.network.predict_classes(x, batch_size=32,verbose=False)[0]
        tmp2=self.network.predict_proba(x, batch_size=32,verbose=False)[0]
        am= np.array(tmp2).argmax()
        return 0,self._vect_label(am)
            
    def silence_predict_on_csv(self,lab):
        cc=0.0
        cpt=len(lab)
        out = []
        for i in lab:
            tmp = "##LEN%02d ##POS%02d ##IDX%02d %s"%(cpt,cc,int((cc/cpt)*self.nb_index),i[1]) 
            cc+=1
            confidence,predd = self.silence_get_prediction(tmp)
            out.append(predd)
        return out#,out_true

In [77]:
class RFPredictor:

    def __init__(self,network,vectorizer,classes_names,nb_index=10,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        self.nb_index = nb_index
        self.len_graph = len_graph
        
    def _vect_label(self,n):
        tmp = np.zeros(len(self.classes_names))
        tmp[n] = 1
        return tmp
    
    def silence_get_prediction(self,text):
        corr = self.classes_names
        tt = self.vect.transform([text])

        a = self.network.predict_proba(tt)
        c = a.max()
        return 0,self._vect_label(a.argmax())
            
    def silence_predict_on_csv(self,lab):
        cc=0.0
        cpt=len(lab)
        out = []
        for i in lab:
            tmp = "##IDX%s %s"%(str(int((cc/cpt)*self.nb_index)),i[1])
            cc+=1
            confidence,predd = self.silence_get_prediction(tmp)
            out.append(predd)
        return out#,out_true

In [78]:
class SVCPredictor:

    def __init__(self,network,vectorizer,classes_names,nb_index=10,len_graph=20):
        self.tagger = Blobber(pos_tagger=PerceptronTagger())
        self.classes_names = classes_names
        self.vect = vectorizer
        self.network = network
        self.nb_index = nb_index
        self.len_graph = len_graph
        
    def _vect_label(self,n):
        tmp = np.zeros(len(self.classes_names))
        tmp[n] = 1
        return tmp
    
    def silence_get_prediction(self,text):
        corr = self.classes_names
        tt = self.vect.transform([text])

        a = self.network.decision_function(tt)
        c = a.max()-a.mean()
        return 0,self._vect_label(a.argmax())
            
    def silence_predict_on_csv(self,lab):
        cc=0.0
        cpt=len(lab)
        out = []
        for i in lab:
            tmp = "##IDX%s %s"%(str(int((cc/cpt)*self.nb_index)),i[1])
            cc+=1
            confidence,predd = self.silence_get_prediction(tmp)
            out.append(predd)
        return out#,out_true

In [107]:
def evaluate_on_annotated(f_name,predictor,mapping_prediction,mapping_true):
    df = pd.read_csv(f_name,sep=';')
    df.columns = ["Number","Type","BACKGROUND","OBJECTIVE","METHOD","RESULT","Sentences"]

    sentences=[]
    stack = [[]]
    classes_names_doc = ["BACKGROUND","OBJECTIVE","METHOD","RESULT"]
    for i, [index, row] in enumerate(df.iterrows()):
        if row["Number"]==row["Number"]:
            if row["Type"]=="File name":
                stack.append([])
            elif row["Type"]=="Title":
                pass
            else:
                labels = []
                for i in classes_names_doc:
                    x = row[i]
                    if x == x:
                        labels.append(i)
                if len(labels)>0:
                    stack[-1].append([labels,row["Sentences"]])
    del(stack[0])

    def vect_label(n,nb):
        tmp = np.zeros(nb)
        tmp[n] = 1
        return tmp

    tmp_dic = {"BACKGROUND":0,"OBJECTIVE":1,"METHOD":2,"RESULT":3}

    pred_label=[]
    true_label=[]
    skipped=0
    for x in stack:
        try:
            pred_label.append(predictor.silence_predict_on_csv(x))
            tmp = []
            for j in x:
                tmp.append(vect_label([ tmp_dic[i] for i in j[0] ], 4))
            true_label.append(tmp)
        except:
            skipped+=1
            pass
    #print("Abstracts with errors : %d"%(skipped))

    plain_t=[]
    plain_p=[]
    for i in true_label:
        for j in i:
            plain_t.append(j)
    for i in pred_label:
        for j in i:
            plain_p.append(j)

    ####        
    map_from = mapping_prediction[0]
    map_to   = mapping_prediction[1]
    d = {}
    c=0
    for idx,i in enumerate(map_from):
        for idx2,j in enumerate(i):
            d[c]=idx
            c+=1

    map_from = mapping_true[0]
    map_to   = mapping_true[1]
    d2 = {}
    c=0
    for idx,i in enumerate(map_from):
        for idx2,j in enumerate(i):
            d2[c]=idx
            c+=1

    ####    
    n_plain_p=[]
    for i in plain_p:
        tmp = np.zeros(len(map_to))
        for idx, i in enumerate(i):
            if i!=0:
                tmp[d[idx]] = 1
        n_plain_p.append(tmp)
    n_plain_t=[]
    for i in plain_t:
        tmp = np.zeros(len(map_to))
        for idx, i in enumerate(i):
            if i!=0:
                tmp[d2[idx]] = 1
        n_plain_t.append(tmp)

    cpt = 0
    for idx,i in enumerate(n_plain_p):
        isit=False
        for idx2,x in enumerate(i):
            if x==1 and x==n_plain_t[idx][idx2]:
                isit=True
        if isit:
            cpt+=1
    print("Accuracy : %.f%% [%d/%d]"%((float(cpt)/len(n_plain_p))*100,cpt,len(n_plain_p)))
        
    #_local_evaluate(n_plain_t,n_plain_p)
    return n_plain_t, n_plain_p, stack

In [92]:
def _local_evaluate(n_plain_t,n_plain_p):
    a1=[]
    a2=[]
    cpt=0
    cpt_on=[]
    cpt_real=[]
    
    #print("Accuracy : %.f%% [%d/%d]"%((float(cpt)/len(n_plain_p))*100,cpt,len(n_plain_p)))

    for idx, i in enumerate(n_plain_p):
        a1.append(np.array(i).argmax())
        a2.append(np.array(n_plain_t[idx]).argmax())

    # for info on this score, cf:
    # http://scikit-learn.org/stable/modules/generated/sklearn.metrics.label_ranking_average_precision_score.html
    print("Ranked precision score: %.06f"%metrics.label_ranking_average_precision_score(n_plain_t,n_plain_p))

    cpt_on = np.array(cpt_on)
    print(metrics.classification_report(a2,a1,target_names=map_to))

    print("Confusion matrix:")
    cm = confusion_matrix(a2, a1)
    print(cm)
    sns.set_style("ticks")
    sns.mpl.rc("figure", figsize=(8,4))

    np.set_printoptions(precision=2)
    cm_normalized = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]
    fig = plt.figure()
    plt.imshow(cm_normalized, interpolation='nearest', cmap=plt.cm.Blues)
    plt.title('Normalized confusion matrix')
    plt.colorbar()
    tick_marks = np.arange(len(map_to))
    plt.xticks(tick_marks, map_to, rotation=45)
    plt.yticks(tick_marks, map_to)
    plt.ylabel('True label')
    plt.xlabel('Predicted label')
    plt.tick_params(which='both', direction='in',length=0)
    plt.show()

In [81]:
skipped=0
pred_label=[]
l=[]
for idx,x in enumerate(ac_stack):
    try:
        pred_label.append(nn_pred.silence_predict_on_csv(x))
        tmp = []
        #for j in x:
        #    tmp.append(vect_label([ tmp_dic[i] for i in j[0] ], 4))
        #true_label.append(tmp)
    except:
        l.append(idx)
        skipped+=1
        pass


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-81-cd7cfd439f8e> in <module>()
      2 pred_label=[]
      3 l=[]
----> 4 for idx,x in enumerate(ac_stack):
      5     try:
      6         pred_label.append(nn_pred.silence_predict_on_csv(x))

NameError: name 'ac_stack' is not defined

In [187]:
#for i in l[::-1]:
#    del ac_stack[i]

In [188]:
print(len(ac_stack))
print(skipped)


521
19

In [190]:
tools.dump_pickle(ac_stack,"dirty_ac_stack")


File already exist. Overwrite? [Y/N]
>Y
Dumping...
Done. [0.08s]

In [176]:
tools.dump_pickle(ac_true,"dirty_ac_true")


Dumping...
Done. [0.17s]

In [162]:
pred_label[0]


Out[162]:
[array([ 1.,  0.,  0.,  0.]), array([ 0.,  0.,  1.,  0.])]

In [182]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
t_ac_true = []
t_ac_pred = []
t_ac_stack = []
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        n_plain_t, n_plain_p, stack = evaluate_on_annotated(way,nn_pred,mapping_prediction,mapping_true)
        t_ac_true.append(n_plain_t)
        t_ac_pred.append(n_plain_p)

        t_ac_stack.append(stack)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 48% [289/602]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 43% [52/121]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 55% [69/126]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 50% [64/128]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 49% [273/556]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 45% [273/608]

In [183]:
ac_true = []
ac_pred = []
ac_stack = []

for i in t_ac_true:
    for j in i:
        ac_true.append(j)
for i in t_ac_pred:
    for j in i:
        ac_pred.append(j)
for i in t_ac_stack:
    for j in i:
        ac_stack.append(j)

In [113]:
def _local_evaluate(n_plain_t,n_plain_p):
    c = 0
    for idx,i in enumerate(n_plain_p):
        isit=False
        for idx2,x in enumerate(i):
            if x==1 and x==n_plain_t[idx][idx2]:
                isit=True
        if isit:
            c+=1
    print("Accuracy : %.02f%% [%d/%d]"%((float(c)/len(n_plain_p))*100,c,len(n_plain_p)))
    print("Ranked precision score: %.06f"%metrics.label_ranking_average_precision_score(n_plain_t,n_plain_p))

In [195]:
ac_stack = tools.load_pickle("dirty_ac_stack.pickle")
ac_true = tools.load_pickle("dirty_ac_true.pickle")


Loading 'dirty_ac_stack.pickle'...
Done. [0.04s]
Loading 'dirty_ac_true.pickle'...
Done. [0.12s]

In [116]:
%%time
ac_stack = tools.load_pickle("dirty_ac_stack.pickle")
ac_true = tools.load_pickle("dirty_ac_true.pickle")

nn_pred = LSTMPredictor(net,vectorizer,classes_names)
pred_label=[]
for idx,x in enumerate(ac_stack):
    pred_label.append(nn_pred.silence_predict_on_csv(x))
    tmp = []
ac_pred_label = []
for i in pred_label:
    for j in i:
        ac_pred_label.append(j)
_local_evaluate(ac_true,ac_pred_label)


Loading 'dirty_ac_stack.pickle'...
Done. [0.03s]
Loading 'dirty_ac_true.pickle'...
Done. [0.08s]
Accuracy : 61.89% [1325/2141]
Ranked precision score: 0.706368
CPU times: user 9.18 s, sys: 63.1 ms, total: 9.24 s
Wall time: 9.54 s

Map a set of inputs to an other (collapse a set of label onto a restricted one)


In [82]:
nn_pred = LSTMPredictor(net,vectorizer,classes_names,len_graph=20)

In [54]:
svc_pred = SVCPredictor(models["clf_svc"],models["vectorizer_svc"],classes_names,nb_index=10,len_graph=20)

In [66]:
evaluate_on_annotated('./annotations/csv/abst_check_v4_aizawa.csv',nn_pred,mapping_prediction,mapping_true)


Accuracy : 65% [391/602]
Ranked precision score: 0.758306
             precision    recall  f1-score   support

  OBJECTIVE       0.85      0.58      0.69       277
     METHOD       0.50      0.75      0.60       207
     RESULT       0.63      0.55      0.59       118

avg / total       0.69      0.63      0.64       602

Confusion matrix:
[[161 105  11]
 [ 25 155  27]
 [  4  49  65]]
Out[66]:
([array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  1.]),
  array([ 1.,  0.,  1.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  1.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.])],
 [array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 1.,  0.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  1.,  0.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.]),
  array([ 0.,  0.,  1.])],
 [[[['BACKGROUND', 'OBJECTIVE'],
    'In this paper we present a new, multilingual data-driven method for coreference resolution as implemented in the SWIZZLE system.'],
   [['RESULT'],
    'The results obtained after training this system on a bilingual corpus of English and Romanian tagged texts, outperformed coreference resolution in each of the individual languages.']],
  [[['OBJECTIVE'],
    'We are presenting a working system for automated news analysis that ingests an average total of 7600 news articles per day in five languages.'],
   [['METHOD'],
    'For each language, the system detects the major news stories of the day using a group-average unsupervised agglomerative clustering process.'],
   [['METHOD'],
    'It also tracks, for each cluster, related groups of articles published over the previous seven days, using a cosine of weighted terms.'],
   [['METHOD'],
    'The system furthermore tracks related news across languages, in all language pairs involved.'],
   [['METHOD'],
    'The cross-lingual news cluster similarity is based on a linear combination of three types of input: (a) cognates, (b) automatically detected references to geographical place names and (c) the results of a mapping process onto a multilingual classification system.'],
   [['RESULT'],
    'A manual evaluation showed that the system produces good results.']],
  [[['BACKGROUND'],
    'It is difficult to identify sentence importance from a single point of view.'],
   [['OBJECTIVE'],
    'In this paper, we propose a learning-based approach to combine various sentence features.'],
   [['METHOD'],
    'They are categorized as surface, content, relevance and event features.'],
   [['METHOD'],
    'Surface features are related to extrinsic aspects of a sentence.'],
   [['METHOD'],
    'Content features measure a sentence based on content-conveying words.'],
   [['METHOD'],
    'Event features represent sentences by events they contained.'],
   [['METHOD'],
    'Relevance features evaluate a sentence from its relatedness with other sentences.'],
   [['RESULT'],
    'Experiments show that the combined features improved summarization performance significantly.'],
   [['RESULT'],
    'Although the evaluation results are encouraging, supervised learning approach requires much labeled data.'],
   [['METHOD'],
    'Therefore we investigate co-training by combining labeled and unlabeled data.'],
   [['RESULT'],
    'Experiments show that this semi-supervised learning approach achieves comparable performance to its supervised counterpart and saves about half of the labeling time cost.']],
  [[['BACKGROUND'],
    'Multilinguality in ontologies has become an impending need for institutions worldwide with valuable linguistic resources in different natural languages.'],
   [['BACKGROUND'],
    'Since most ontologies are developed in one language, obtaining multilingual ontologies implies to localize or adapt them to a concrete language and culture com munity.'],
   [['OBJECTIVE', 'METHOD'],
    'As the adaptation of the ontology conceptualization demands considerable efforts, we propose to modify the ontology terminological layer, and provide a model called Linguistic Information Repository (LIR) that associated to the ontology meta-model allows terminological layer localization.']],
  [[['OBJECTIVE', 'METHOD'],
    'We explore the near-synonym lexical choice problem using a novel representation of near-synonyms and their contexts in the latent semantic space.'],
   [['METHOD'],
    'In contrast to traditional latent semantic analysis (LSA), our model is built on the lexical level of co-occurrence, which has been empirically proven to be effective in providing higher dimensional information on the subtle differences among near-synonyms.'],
   [['RESULT'],
    "By employing supervised learning on the latent features, our system achieves an accuracy of 74.5% in a ``fill-in-the-blank'' task."],
   [['RESULT'],
    'The improvement over the current state-of-the-art is statistically significant.'],
   [['METHOD'],
    'We also formalize the notion of subtlety through its relation to semantic space dimensionality.'],
   [['METHOD'],
    'Using this formalization and our learning models, several of our intuitions about subtlety, dimensionality, and context are quantified and empirically tested.']],
  [[['OBJECTIVE'],
    'In this paper we address methodological issues in the evaluation of a projection-based framework for dependency parsing in which annotations for a source language are transfered to a target language using word alignments in a parallel corpus.'],
   [['METHOD'],
    'The projected trees then constitute the training data for a data-driven parser in the target language.'],
   [['RESULT'],
    'We discuss two problems that arise in the evaluation of such cross-lingual approaches.'],
   [['RESULT'],
    'First, the annotation scheme underlying the source language annotations -- and hence the projected target annotations and predictions of the parser derived from them -- is likely to differ from previously existing gold standard test sets devised specifically for the target language.'],
   [['RESULT'],
    'Second, the standard procedure of cross-validation cannot be performed in the absence of parallel gold standard annotations, so an alternative method has to be used to assess the generalization capabilities of the projected parsers.']],
  [[['OBJECTIVE'],
    'We investigate differences in point of view (POV) between two objective documents, where one is describing the subject matter in a more positive/negative way than the other, and present an automatic method for detecting such POV differences.'],
   [['METHOD'],
    'We use Amazon Mechanical Turk (AMT) to annotate sentences as positive, negative or neutral based on their POV towards a given target.'],
   [['METHOD'],
    "A statistical classifier is trained to predict the POV score of a document, which reflects how positive/negative the document's POV towards its target is."],
   [['RESULT'],
    'The results of our experiments on a set of articles in the Arabic and English Wikipedias from the people category show that our method successfully detects POV differences.']],
  [[['OBJECTIVE'],
    'We present a method for learning to find English to Chinese transliterations on the Web.'],
   [['METHOD'],
    'In our approach, proper nouns are expanded into new queries aimed at maximizing the probability of retrieving transliterations from existing search engines.'],
   [['METHOD'],
    'The method involves learning the sublexical relationships between names and their transliterations.'],
   [['METHOD'],
    'At run-time, a given name is automatically extended into queries with relevant morphemes, and transliterations in the returned search snippets are extracted and ranked.'],
   [['METHOD'],
    'We present a new system, TermMine, that applies the method to find transliterations of a given name.'],
   [['RESULT'],
    'Evaluation on a list of 500 proper names shows that the method achieves high precision and recall, and outperforms commercial machine translation systems.']],
  [[['OBJECTIVE'],
    'In this paper we address two key challenges for extractive multi-document summarization: the search problem of finding the best scoring summary and the training problem of learning the best model parameters.'],
   [['METHOD'],
    'We propose an A* search algorithm to find the best extractive summary up to a given length, which is both optimal and efficient to run.'],
   [['METHOD'],
    'Further, we propose a discriminative training algorithm which directly maximises the quality of the best summary, rather than assuming a sentence-level decomposition as in earlier work.'],
   [['RESULT'],
    'Our approach leads to significantly better results than earlier techniques across a number of evaluation metrics.']],
  [[['BACKGROUND'],
    'Dependency structure, as a first step towards semantics, is believed to be helpful to improve translation quality.'],
   [['BACKGROUND'],
    'However, previous works on dependency structure based models typically resort to insertion operations to complete translations, which make it difficult to specify ordering information in translation rules.'],
   [['METHOD'],
    'In our model of this paper, we handle this problem by directly specifying the ordering information in head-dependents rules which represent the source side as head-dependents relations and the target side as strings.'],
   [['METHOD'],
    'The head-dependents rules require only substitution operation, thus our model requires no heuristics or separate ordering models of the previous works to control the word order of translations.'],
   [['RESULT'],
    'Large-scale experiments show that our model performs well on long distance reordering, and outperforms the state-of-the-art constituency-to-string model (+1.47 BLEU on average) and hierarchical phrase-based model (+0.46 BLEU on average) on two Chinese-English NIST test sets without resort to phrases or parse forest.'],
   [['RESULT'],
    'For the first time, a source dependency structure based model catches up with and surpasses the state-of-the-art translation models.']],
  [[['BACKGROUND', 'RESULT'],
    'Human engagement in narrative is partially driven by reasoning about discourse relations between narrative events, and the expectations about what is likely to happen next that results from such reasoning.'],
   [['BACKGROUND', 'RESULT'],
    'Researchers in NLP have tackled modeling such expectations from a range of perspectives, including treating it as the inference of the CONTINGENT discourse relation, or as a type of common-sense causal reasoning.'],
   [['OBJECTIVE', 'METHOD'],
    'Our approach is to model likelihood between events by drawing on several of these lines of previous work.'],
   [['METHOD'],
    'We implement and evaluate different unsupervised methods for learning event pairs that are likely to be CONTINGENT on one another.'],
   [['METHOD'],
    'We refine event pairs that we learn from a corpus of film scene descriptions utilizing web search counts, and evaluate our results by collecting human judgments of contingency.'],
   [['RESULT'],
    'Our results indicate that the use of web search counts increases the average accuracy of our best method to 85.64% over a baseline of 50%, as compared to an average accuracy of 75.15% without web search.']],
  [[['BACKGROUND'],
    'When translating from languages with hardly any inflectional morphology like English into morphologically rich languages, the English word forms often do not contain enough information for producing the correct full form in the target language.'],
   [['OBJECTIVE', 'METHOD'],
    'We investigate methods for improving the quality of such translations by making use of part-of-speech information and maximum entropy modeling.'],
   [['RESULT'],
    'Results for translations from English into Spanish and Catalan are presented on the LC-STAR corpus which consists of spontaneously spoken dialogues in the domain of appointment scheduling and travel planning.']],
  [[['BACKGROUND'],
    'One way to construct semantic representations in a robust manner is to enhance shallow language processors with semantic components.'],
   [['OBJECTIVE', 'METHOD'],
    'Here, we provide a model theory for a semantic formalism that is designed for this, namely Robust Minimal Recursion Semantics (RMRS).'],
   [['RESULT'],
    'We show that RMRS supports a notion of entailment that allows it to form the basis for comparing the semantic output of different parses of varying depth.']],
  [[['OBJECTIVE'],
    'In this paper we show how two standard outputs from information extraction (IE) systems -- named entity annotations and scenario templates -- can be used to enhance access to text collections via a standard text browser.'],
   [['METHOD'],
    "We describe how this information is used in a prototype system designed to support information workers' access to a pharmaceutical news archive as part of their ``industry watch'' function."],
   [['RESULT'],
    'We also report results of a preliminary, qualitative user evaluation of the system, which while broadly positive indicates further work needs to be done on the interface to make users aware of the increased potential of IE-enhanced text browsers.']],
  [[['OBJECTIVE', 'METHOD'],
    'Several methods are discussed that construct a finite automaton given a context-free grammar, including both methods that lead to subsets and those that lead to supersets of the original context-free language.'],
   [['RESULT'],
    'Practical experiments with the different methods of regular approximation are performed for spoken-language input: hypotheses from a speech recognizer are filtered through a finite automaton.']],
  [[['OBJECTIVE'],
    'The paper defines weighted head transducers, finite-state machines that perform middle-out string transduction.'],
   [['OBJECTIVE'],
    'These transducers are strictly more expressive than the special case of standard left-to-right finite-state transducers.'],
   [['METHOD'],
    'Dependency transduction models are then defined as collections of weighted head transducers that are applied hierarchically.'],
   [['METHOD'],
    'A dynamic programming search algorithm is described for finding the optimal transduction of an input string with respect to a dependency transduction model.'],
   [['METHOD'],
    'A method for automatically training a dependency transduction model from a set of input-output example strings is presented.'],
   [['METHOD'],
    'The method first searches for hierarchical alignments of the training examples guided by correlation statistics, and then constructs the transitions of head transducers that are consistent with these alignments.'],
   [['RESULT'],
    'Experimental results are given for applying the training method to translation from English to Spanish and Japanese.']],
  [[['OBJECTIVE'],
    'This paper presents a computational model for nonlinear morphology with illustrations from Syriac and Arabic.'],
   [['METHOD'],
    'The model is a multitiered one in that it allows for multiple lexical representations corresponding to the multiple tiers of autosegmental phonology.'],
   [['METHOD'],
    'The model consists of three main components: (i) a lexicon, which is made of sublexica, with each sublexicon representing lexical material from a specific tier, (ii) a rewrite rules component that maps multiple lexical representations into one surface form and vice versa, and (iii) a morphotactic component that employs regular grammars.'],
   [['METHOD'],
    'The system is finite-state in that lexica and rules can be represented by multitape finite-state machines.']],
  [[['BACKGROUND'],
    'An important aspect of the interpretation of multimodal messages is the ability to identify when the same object in the world is the referent of symbols in different modalities.'],
   [['BACKGROUND'],
    'To understand the caption of a picture, for instance, one needs to identify the graphical symbols that are referred to by names and pronouns in the natural language text.'],
   [['BACKGROUND'],
    'One way to think of this problem is in terms of the notion of anaphora; however, unlike linguistic anaphoric inference, in which antecedents for pronouns are selected from a linguistic context, in the interpretation of the textual part of multimodal messages the antecedents are selected from a graphical context.'],
   [['BACKGROUND'],
    'Under this view, resolving multimodal references is like resolving anaphora across modalities.'],
   [['BACKGROUND'],
    'Another way to see the same problem is to look at pronouns in texts about drawings as deictic.'],
   [['BACKGROUND'],
    'In this second view, the context of interpretation of a natural language term is defined as a set of expressions of a graphical language with well-defined syntax and semantics.'],
   [['BACKGROUND'],
    'Natural language and graphical terms are thought of as standing in a relation of translation similar to the translation relation that holds between natural languages.'],
   [['OBJECTIVE'],
    'In this paper a theory based on this second view is presented.'],
   [['METHOD'],
    'In this theory, the relations between multimodal representation and spatial deixis, on the one hand, and multimodal reasoning and deictic inference, on the other, are discussed.'],
   [['METHOD'],
    'An integrated model of anaphoric and deictic resolution in the context of the interpretation of multimodal discourse is also advanced.']],
  [[['BACKGROUND'],
    'Pronunciation by analogy (PbA) is a data-driven method for relating letters to sound, with potential application to next-generation text-to-speech systems.'],
   [['OBJECTIVE'],
    'This paper extends previous work on PbA in several directions.'],
   [['METHOD'],
    "First, we have included ``full'' pattern matching between input letter string and dictionary entries, as well as including lexical stress in letter-to-phoneme conversion."],
   [['METHOD'],
    'Second, we have extended the method to phoneme-to-letter conversion.'],
   [['METHOD'],
    'Third, and most important, we have experimented with multiple, different strategies for scoring the candidate pronunciations.'],
   [['METHOD'],
    'Individual scores for each strategy are obtained on the basis of rank and either multiplied or summed to produce a final, overall score.'],
   [['METHOD'],
    'Five strategies have been studied and results obtained from all 31 possible combinations.'],
   [['METHOD'],
    'The two combination methods perform comparably, with the product rule only very marginally superior to the sum rule.'],
   [['RESULT'],
    'Nonparametric statistical analysis reveals that performance improves as more strategies are included in the combination: this trend is very highly significant (p << 0.0005).'],
   [['RESULT'],
    'Accordingly for letter-to-phoneme conversion, best results are obtained when all five strategies are combined: word accuracy is raised to 65.5% relative to 61.7% for our best previous result and 63.0% for the best-performing single strategy.'],
   [['RESULT'],
    'Accordingly for letter-to-phoneme conversion, best results are obtained when all five strategies are combined: word accuracy is raised to 65.5% relative to 61.7% for our best previous result and 63.0% for the best-performing single strategy.'],
   [['RESULT'],
    'Similar results were found for phoneme-to-letter and letter-to-stress conversion, although the former was an easier problem for PbA than letter-to-phoneme conversion and the latter was harder.'],
   [['RESULT'],
    'The main sources of error for the multistrategy approach are very similar to those for the best single strategy, and mostly involve vowel letters and phonemes.']],
  [[['BACKGROUND'],
    'In a medical information extraction system, we use common word association techniques to extract side-effect-related terms.'],
   [['BACKGROUND'], 'Many of these terms have a frequency of less than five.'],
   [['BACKGROUND'],
    'Standard word-association-based applications disregard the lowest-frequency words, and hence disregard useful information.'],
   [['OBJECTIVE'],
    'We therefore devised an extraction system for the full word frequency range.'],
   [['METHOD'],
    "This system computes the significance of association by the log-likelihood ratio and Fisher's exact test."],
   [['RESULT'],
    'The output of the system shows a recurrent, corpus-independent pattern in both recall and the number of significant words.'],
   [['OBJECTIVE'],
    'We will explain these patterns by the statistical behavior of the lowest-frequency words.'],
   [['METHOD'],
    'We used Dutch verb-particle combinations as a second and independent collocation extraction application to illustrate the generality of the observed phenomena.'],
   [['RESULT'],
    'We will conclude that a) word-association-based extraction systems can be enhanced by also considering the lowest-frequency words, b) significance levels should not be fixed but adjusted for the optimal window size, c) hapax legomena, words occurring only once, should be disregarded a priori in the statistical analysis, and d) the distribution of the targets to extract should be considered in combination with the extraction method.']],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [],
  [[['BACKGROUND'],
    'A challenging problem faced by researchers and developers of distributed real-time and embedded (DRE) systems is devising and implementing effective adaptive resource management strategies that can meet end-to-end quality of service (QoS) requirements in varying operational conditions.'],
   [['OBJECTIVE'],
    'This paper presents two contributions to research in adaptive resource management for DRE systems.'],
   [['METHOD'],
    'First, we describe the structure and functionality of the Hybrid Adaptive Resourcemanagement Middleware (HyARM), which provides adaptive resource management using hybrid control techniques for adapting to workload fluctuations and resource availability.'],
   [['METHOD'],
    'Second, we evaluate the adaptive behavior of HyARM via experiments on a DRE multimedia system that distributes video in real-time.'],
   [['RESULT'],
    'Our results indicate that HyARM yields predictable, stable, and high system performance, even in the face of fluctuating workload and resource availability.']],
  [[['BACKGROUND'],
    'Ensemble Kalman filter data assimilation methodology is a popular approach for hydrocarbon reservoir simulations in energy exploration.'],
   [['BACKGROUND'],
    'In this approach, an ensemble of geological models and production data of oil fields is used to forecast the dynamic response of oil wells.'],
   [['BACKGROUND'],
    'The Schlumberger ECLIPSE software is used for these simulations.'],
   [['BACKGROUND'],
    'Since models in the ensemble do not communicate, message-passing implementation is a good choice.'],
   [['BACKGROUND'],
    'Each model checks out an ECLIPSE license and therefore, parallelizability of reservoir simulations depends on the number licenses available.'],
   [['METHOD'],
    'We have Grid-enabled the ensemble Kalman filter data assimilation methodology for the TIGRE Grid computing environment.'],
   [['RESULT'],
    'By pooling the licenses and computing resources across the collaborating institutions using GridWay metascheduler and TIGRE environment, the computational accuracy can be increased while reducing the simulation runtime.'],
   [['RESULT'],
    'In this paper, we provide an account of our efforts in Grid-enabling the ensemble Kalman Filter data assimilation methodology.'],
   [['RESULT'],
    'Potential benefits of this approach, observations and lessons learned will be discussed.']],
  [[['BACKGROUND'],
    'Wireless Sensor Networks have been proposed for use in many location-dependent applications.'],
   [['BACKGROUND'],
    'Most of these need to identify the locations of wireless sensor nodes, a challenging task because of the severe constraints on cost, energy and effective range of sensor devices.'],
   [['OBJECTIVE'],
    'To overcome limitations in existing solutions, we present a Multi-Sequence Positioning (MSP) method for large-scale stationary sensor node localization in outdoor environments.'],
   [['METHOD'],
    'The novel idea behind MSP is to reconstruct and estimate two-dimensional location information for each sensor node by processing multiple one-dimensional node sequences, easily obtained through loosely guided event distribution.'],
   [['METHOD'],
    'Starting from a basic MSP design, we propose four optimizations, which work together to increase the localization accuracy.'],
   [['METHOD'],
    'We address several interesting issues, such as incomplete (partial) node sequences and sequence flip, found in the Mirage test-bed we built.'],
   [['METHOD'],
    'We have evaluated the MSP system through theoretical analysis, extensive simulation as well as two physical systems (an indoor version with 46 MICAz motes and an outdoor version with 20 MICAz motes).'],
   [['RESULT'],
    'This evaluation demonstrates that MSP can achieve an accuracy within one foot, requiring neither additional costly hardware on sensor nodes nor precise event distribution.'],
   [['RESULT'],
    'It also provides a nice tradeoff between physical cost (anchors) and soft cost (events), while maintaining localization accuracy.']],
  [[['BACKGROUND'],
    'The problem of localization in wireless sensor networks where nodes do not use ranging hardware, remains a challenging problem, when considering the required location accuracy, energy expenditure and the duration of the localization phase.'],
   [['OBJECTIVE', 'METHOD'],
    'In this paper we propose a framework, called StarDust, for wireless sensor network localization based on passive optical components.'],
   [['METHOD'],
    'In the StarDust framework, sensor nodes are equipped with optical retro-reflectors.'],
   [['METHOD'],
    'An aerial device projects light towards the deployed sensor network, and records an image of the reflected light.'],
   [['METHOD'],
    'An image processing algorithm is developed for obtaining the locations of sensor nodes.'],
   [['METHOD'],
    'For matching a node ID to a location we propose a constraint-based label relaxation algorithm.'],
   [['METHOD'],
    'We propose and develop localization techniques based on four types of constraints: node color, neighbor information, deployment time for a node and deployment location for a node.'],
   [['METHOD'],
    'We evaluate the performance of a localization system based on our framework by localizing a network of 26 sensor nodes deployed in a 120 \xef\xbe\x83\xe3\x83\xbb60 ft2 area.'],
   [['RESULT'],
    'The localization accuracy ranges from 2 ft to 5 ft while the localization time ranges from 10 milliseconds to 2 minutes.']],
  [[['BACKGROUND'],
    'Archival storage of sensor data is necessary for applications that query, mine, and analyze such data for interesting features and trends.'],
   [['BACKGROUND'],
    'We argue that existing storage systems are designed primarily for flat hierarchies of homogeneous sensor nodes and do not fully exploit the multi-tier nature of emerging sensor networks, where an application can comprise tens of tethered proxies, each managing tens to hundreds of untethered sensors.'],
   [['OBJECTIVE', 'METHOD'],
    'We present TSAR, a fundamentally different storage architecture that envisions separation of data from metadata by employing local archiving at the sensors and distributed indexing at the proxies.'],
   [['METHOD'],
    'At the proxy tier, TSAR employs a novel multi-resolution ordered distributed index structure, the Interval Skip Graph, for efficiently supporting spatio-temporal and value queries.'],
   [['METHOD'],
    'At the sensor tier, TSAR supports energy-aware adaptive summarization that can trade off the cost of transmitting metadata to the proxies against the overhead of false hits resulting from querying a coarse-grain index.'],
   [['METHOD'],
    'We implement TSAR in a two-tier sensor testbed comprising Stargate-based proxies and Mote-based sensors.'],
   [['RESULT'],
    'Our experiments demonstrate the benefits and feasibility of using our energy-efficient storage architecture in multi-tier sensor networks.']],
  [[['BACKGROUND'],
    'In many sensor networks, data or events are named by attributes.'],
   [['BACKGROUND'],
    'Many of these attributes have scalar values, so one natural way to query events of interest is to use a multidimensional range query.'],
   [['BACKGROUND'],
    'An example is: List all events whose temperature lies between 50\xe7\xac\xb3\xef\xbd\xa6 and 60\xe7\xac\xb3\xef\xbd\xa6 , and whose light levels lie between 10 and 15.'],
   [['BACKGROUND'],
    'Such queries are useful for correlating events occurring within the network.'],
   [['OBJECTIVE'],
    'In this paper, we describe the design of a distributed index that scalably supports multi-dimensional range queries.'],
   [['METHOD'],
    'Our distributed index for multi-dimensional data (or DIM) uses a novel geographic embedding of a classical index data structure, and is built upon the GPSR geographic routing algorithm.'],
   [['RESULT'],
    'Our analysis reveals that, under reasonable assumptions about query distributions, DIMs scale quite well with network size (both insertion and query costs scale as O( \xe7\xab\x8f\xe3\x83\xbbN)).'],
   [['RESULT'],
    'In detailed simulations, we show that in practice, the insertion and query costs of other alternatives are sometimes an order of magnitude more than the costs of DIMs, even for moderately sized network.'],
   [['RESULT'],
    'Finally, experiments on a small scale testbed validate the feasibility of DIMs.']],
  [[['BACKGROUND'],
    'Traditional mobile ad-hoc network (MANET) routing protocols assume that contemporaneous end-to-end communication paths exist between data senders and receivers.'],
   [['BACKGROUND'],
    'In some mobile ad-hoc networks with a sparse node population, an end-to-end communication path may break frequently or may not exist at any time.'],
   [['BACKGROUND'],
    'Many routing protocols have been proposed in the literature to address the problem, but few were evaluated in a realistic opportunistic network setting.'],
   [['METHOD'],
    'We use simulation and contact traces (derived from logs in a production network) to evaluate and compare five existing protocols: direct-delivery, epidemic, random, PRoPHET, and Link-State, as well as our own proposed routing protocol.'],
   [['RESULT'],
    'We show that the direct delivery and epidemic routing protocols suffer either low delivery ratio or high resource usage, and other protocols make tradeoffs between delivery ratio and resource usage.']],
  [[['OBJECTIVE'],
    'This paper describes the design, implementation and evaluation of a search and rescue system called CenWits.'],
   [['METHOD'],
    'CenWits uses several small, commonly-available RF-based sensors, and a small number of storage and processing devices.'],
   [['METHOD'],
    'It is designed for search and rescue of people in emergency situations in wilderness areas.'],
   [['METHOD'],
    'A key feature of CenWits is that it does not require a continuously connected sensor network for its operation.'],
   [['METHOD'],
    'It is designed for an intermittently connected network that provides only occasional connectivity.'],
   [['METHOD'],
    'It makes a judicious use of the combined storage capability of sensors to filter, organize and store important information, combined battery power of sensors to ensure that the system remains operational for longer time periods, and intermittent network connectivity to propagate information to a processing center.'],
   [['METHOD'],
    'A prototype of CenWits has been implemented using Berkeley Mica2 motes.']],
  [[['BACKGROUND'],
    'In a distributed multi-player game that uses dead-reckoning vectors to exchange movement information among players, there is inaccuracy in rendering the objects at the receiver due to network delay between the sender and the receiver.'],
   [['BACKGROUND'],
    'The object is placed at the receiver at the position indicated by the dead-reckoning vector, but by that time, the real position could have changed considerably at the sender.'],
   [['BACKGROUND'],
    'This inaccuracy would be tolerable if it is consistent among all players; that is, at the same physical time, all players see inaccurate (with respect to the real position of the object) but the same position and trajectory for an object.'],
   [['BACKGROUND'],
    'But due to varying network delays between the sender and different receivers, the inaccuracy is different at different players as well.'],
   [['BACKGROUND'], 'This leads to unfairness in game playing.'],
   [['OBJECTIVE'],
    'In this paper, we first introduce an error measure for estimating this inaccuracy.'],
   [['OBJECTIVE'],
    'Then we develop an algorithm for scheduling the sending of dead-reckoning vectors at a sender that strives to make this error equal at different receivers over time.'],
   [['METHOD'],
    'This algorithm makes the game very fair at the expense of increasing the overall mean error of all players.'],
   [['METHOD'],
    'To mitigate this effect, we propose a budget based algorithm that provides improved fairness without increasing the mean error thereby maintaining the accuracy of game playing.'],
   [['METHOD'],
    'We have implemented both the scheduling algorithm and the budget based algorithm as part of BZFlag, a popular distributed multi-player game.'],
   [['RESULT'],
    'We show through experiments that these algorithms provide fairness among players in spite of widely varying network delays.'],
   [['RESULT'],
    'An additional property of the proposed algorithms is that they require less number of DRs to be exchanged (compared to the current implementation of BZflag) to achieve the same level of accuracy in game playing.']],
  [[['BACKGROUND'],
    'Dead-Reckoning (DR) is an effective method to maintain consistency for Continuous Distributed Multiplayer Games (CDMG).'],
   [['BACKGROUND'],
    'Since DR can filter most unnecessary state updates and improve the scalability of a system, it is widely used in commercial CDMG.'],
   [['BACKGROUND'],
    'However, DR cannot maintain high consistency, and this constrains its application in highly interactive games.'],
   [['BACKGROUND'],
    'With the help of global synchronization, DR can achieve higher consistency, but it still cannot eliminate before inconsistency.'],
   [['OBJECTIVE', 'METHOD'],
    'In this paper, a method named Globally Synchronized DR with Local Lag (GS-DR-LL), which combines local lag and Globally Synchronized DR (GS-DR), is presented.'],
   [['RESULT'],
    'Performance evaluation shows that GS-DR-LL can effectively decrease before inconsistency, and the effects increase with the lag.']],
  [[['BACKGROUND'],
    'Enterprises in the public and private sectors have been making their large spatial data archives available over the Internet.'],
   [['BACKGROUND'],
    'However, interactive work with such large volumes of online spatial data is a challenging task.'],
   [['OBJECTIVE'],
    'We propose two efficient approaches to remote access to large spatial data.'],
   [['METHOD'],
    'First, we introduce a client-server architecture where the work is distributed between the server and the individual clients for spatial query evaluation, data visualization, and data management.'],
   [['OBJECTIVE'],
    'We enable the minimization of the requirements for system resources on the client side while maximizing system responsiveness as well as the number of connections one server can handle concurrently.'],
   [['METHOD'],
    'Second, for prolonged periods of access to large online data, we introduce APPOINT (an Approach for Peer-to-Peer Offloading the INTernet).'],
   [['OBJECTIVE', 'METHOD'],
    'This is a centralized peer-to-peer approach that helps Internet users transfer large volumes of online data efficiently.'],
   [['METHOD'],
    "In APPOINT, active clients of the client-server architecture act on the server's behalf and communicate with each other to decrease network latency, improve service bandwidth, and resolve server congestions."]],
  [[['OBJECTIVE'],
    'In this paper, we present an implemented system for supporting group interaction in mobile distributed computing environments.'],
   [['METHOD'],
    'First, an introduction to context computing and a motivation for using contextual information to facilitate group interaction is given.'],
   [['METHOD'],
    'We then present the architecture of our system, which consists of two parts: a subsystem for location sensing that acquires information about the location of users as well as spatial proximities between them, and one for the actual context-aware application, which provides services for group interaction.']],
  [[['BACKGROUND'],
    'Grid is an emerging infrastructure used to share resources among virtual organizations in a seamless manner and to provide breakthrough computing power at low cost.'],
   [['BACKGROUND'],
    'Nowadays there are dozens of academic and commercial products that allow execution of isolated tasks on grids, but few products support the enactment of long-running processes in a distributed fashion.'],
   [['OBJECTIVE', 'METHOD'],
    'In order to address such subject, this paper presents a programming model and an infrastructure that hierarchically schedules process activities using available nodes in a wide grid environment.'],
   [['RESULT'],
    'Their advantages are automatic and structured distribution of activities and easy process monitoring and steering.']],
  [[['OBJECTIVE'],
    'We define a new class of games, congestion games with load-dependent failures (CGLFs), which generalizes the well-known class of congestion games, by incorporating the issue of resource failures into congestion games.'],
   [['METHOD'],
    'In a CGLF, agents share a common set of resources, where each resource has a cost and a probability of failure.'],
   [['METHOD'],
    'Each agent chooses a subset of the resources for the execution of his task, in order to maximize his own utility.'],
   [['METHOD'],
    'The utility of an agent is the difference between his benefit from successful task completion and the sum of the costs over the resources he uses.'],
   [['RESULT'], 'CGLFs possess two novel features.'],
   [['RESULT'],
    'It is the first model to incorporate failures into congestion settings, which results in a strict generalization of congestion games.'],
   [['RESULT'],
    'In addition, it is the first model to consider load-dependent failures in such framework, where the failure probability of each resource depends on the number of agents selecting this resource.'],
   [['RESULT'],
    'Although, as we show, CGLFs do not admit a potential function, and in general do not have a pure strategy Nash equilibrium, our main theorem proves the existence of a pure strategy Nash equilibrium in every CGLF with identical resources and nondecreasing cost functions.']],
  [[['OBJECTIVE', 'METHOD'],
    'We present a Scalable Distributed Information Management System (SDIMS) that aggregates information about large-scale networked systems and that can serve as a basic building block for a broad range of large-scale distributed applications by providing detailed views of nearby information and summary views of global information.'],
   [['METHOD'],
    'To serve as a basic building block, a SDIMS should have four properties: scalability to many nodes and attributes, flexibility to accommodate a broad range of applications, administrative isolation for security and availability, and robustness to node and network failures.'],
   [['METHOD'],
    'We design, implement and evaluate a SDIMS that (1) leverages Distributed Hash Tables (DHT) to create scalable aggregation trees, (2) provides flexibility through a simple API that lets applications control propagation of reads and writes, (3) provides administrative isolation through simple extensions to current DHT algorithms, and (4) achieves robustness to node and network reconfigurations through lazy reaggregation, on-demand reaggregation, and tunable spatial replication.'],
   [['RESULT'],
    'Through extensive simulations and micro-benchmark experiments, we observe that our system is an order of magnitude more scalable than existing approaches, achieves isolation properties at the cost of modestly increased read latency in comparison to flat DHTs, and gracefully handles failures.']],
  [[['OBJECTIVE'],
    'We present a proxy-based gaming architecture and authority assignment within this architecture that can lead to better game playing experience in Massively Multi-player Online games.'],
   [['METHOD'],
    'The proposed game architecture consists of distributed game clients that connect to game proxies (referred to as communication proxies) which forward game related messages from the clients to one or more game servers.'],
   [['METHOD'],
    'Unlike proxy-based architectures that have been proposed in the literature where the proxies replicate all of the game state, the communication proxies in the proposed architecture support clients that are in proximity to it in the physical network and maintain information about selected portions of the game space that are relevant only to the clients that they support.'],
   [['METHOD'],
    'Using this architecture, we propose an authority assignment mechanism that divides the authority for deciding the outcome of different actions/events that occur within the game between client and servers on a per action/event basis.'],
   [['METHOD', 'RESULT'],
    'We show that such division of authority leads to a smoother game playing experience by implementing this mechanism in a massively multi-player online game called RPGQuest.'],
   [['RESULT'],
    'In addition, we argue that cheat detection techniques can be easily implemented at the communication proxies if they are made aware of the game-play mechanics.']],
  [[['BACKGROUND'],
    "Today's Internet industry suffers from several well-known pathologies, but none is as destructive in the long term as its resistance to evolution."],
   [['BACKGROUND'],
    'Rather than introducing new services, ISPs are presently moving towards greater commoditization.'],
   [['BACKGROUND'],
    "It is apparent that the network's primitive system of contracts does not align incentives properly."],
   [['OBJECTIVE'],
    "In this study, we identify the network's lack of accountability as a fundamental obstacle to correcting this problem: "],
   [['METHOD'],
    'Employing an economic model, we argue that optimal routes and innovation are impossible unless new monitoring capability is introduced and incorporated with the contracting system.'],
   [['METHOD'],
    'Furthermore, we derive the minimum requirements a monitoring system must meet to support first-best routing and innovation characteristics.'],
   [['RESULT'],
    'Our work does not constitute a new protocol; rather, we provide practical and specific guidance for the design of monitoring systems, as well as a theoretical framework to explore the factors that influence innovation.']],
  [[['OBJECTIVE'],
    'The paper presents a wireless sensor network-based mobile countersniper system.'],
   [['METHOD'],
    'A sensor node consists of a helmetmounted microphone array, a COTS MICAz mote for internode communication and a custom sensorboard that implements the acoustic detection and Time of Arrival (ToA) estimation algorithms on an FPGA.'],
   [['METHOD'],
    "A 3-axis compass provides self orientation and Bluetooth is used for communication with the soldier's PDA running the data fusion and the user interface."],
   [['METHOD'],
    'The heterogeneous sensor fusion algorithm can work with data from a single sensor or it can fuse ToA or Angle of Arrival (AoA) observations of muzzle blasts and ballistic shockwaves from multiple sensors.'],
   [['METHOD'],
    'The system estimates the trajectory, the range, the caliber and the weapon type.'],
   [['METHOD'],
    'The paper presents the system design and the results from an independent evaluation at the US Army Aberdeen Test Center.'],
   [['RESULT'],
    'The system performance is characterized by 1-degree trajectory precision and over 95% caliber estimation accuracy for all shots, and close to 100% weapon estimation accuracy for 4 out of 6 guns tested.']],
  [[['BACKGROUND'],
    'Web services can be aggregated to create composite workflows that provide streamlined functionality for human users or other systems.'],
   [['BACKGROUND'],
    "Although industry standards and recent research have sought to define best practices and to improve end-to-end workflow composition, one area that has not fully been explored is the scheduling of a workflow's web service requests to actual service provisioning in a multi-tiered, multi-organisation environment."],
   [['BACKGROUND'],
    'This issue is relevant to modern business scenarios where business processes within a workflow must complete within QoS-defined limits.'],
   [['BACKGROUND'],
    'Because these business processes are web service consumers, service requests must be mapped and scheduled across multiple web service providers, each with its own negotiated service level agreement.'],
   [['OBJECTIVE'],
    'In this paper we provide heuristics for scheduling service requests from multiple business process workflows to web service providers such that a business value metric across all workflows is maximised.'],
   [['METHOD', 'RESULT'],
    'We show that a genetic search algorithm is appropriate to perform this scheduling, and through experimentation we show that our algorithm scales well up to a thousand workflows and produces better mappings than traditional approaches.']],
  [[['BACKGROUND'],
    'The Ringling School of Art and Design is a fully accredited fouryear college of visual arts and design.'],
   [['BACKGROUND'],
    'With a student to computer ratio of better than 2-to-1, the Ringling School has achieved national recognition for its large-scale integration of technology into collegiate visual art and design education.'],
   [['BACKGROUND'],
    'We have found that Mac OS X is the best operating system to train future artists and designers.'],
   [['BACKGROUND'],
    'Moreover, we can now buy Macs to run high-end graphics, nonlinear video editing, animation, multimedia, web production, and digital video applications rather than expensive UNIX workstations.'],
   [['BACKGROUND'],
    'As visual artists cross from paint on canvas to creating in the digital realm, the demand for a high-performance computing environment grows.'],
   [['BACKGROUND'],
    'In our public computer laboratories, students use the computers most often during the workday; at night and on weekends the computers see only light use.'],
   [['BACKGROUND'],
    'In order to harness the lost processing time for tasks such as video rendering, we are testing Xgrid, a suite of Mac OS X applications recently developed by Apple for parallel and distributed high-performance computing.'],
   [['BACKGROUND'],
    'As with any new technology deployment, IT managers need to consider a number of factors as they assess, plan, and implement Xgrid.'],
   [['OBJECTIVE'],
    'Therefore, we would like to share valuable information we learned from our implementation of an Xgrid environment with our colleagues.']],
  [[['OBJECTIVE'],
    'In this paper we address the issue of learning to rank for document retrieval.'],
   [['BACKGROUND'],
    'In the task, a model is automatically created with some training data and then is utilized for ranking of documents.'],
   [['BACKGROUND'],
    'The goodness of a model is usually evaluated with performance measures such as MAP (Mean Average Precision) and NDCG (Normalized Discounted Cumulative Gain).'],
   [['BACKGROUND'],
    'Ideally a learning algorithm would train a ranking model that could directly optimize the performance measures with respect to the training data.'],
   [['BACKGROUND'],
    'Existing methods, however, are only able to train ranking models by minimizing loss functions loosely related to the performance measures.'],
   [['BACKGROUND'],
    'For example, Ranking SVM and RankBoost train ranking models by minimizing classification errors on instance pairs.'],
   [['OBJECTIVE'],
    'To deal with the problem, we propose a novel learning algorithm within the framework of boosting, which can minimize a loss function directly defined on the performance measures.'],
   [['METHOD'],
    "Our algorithm, referred to as AdaRank, repeatedly constructs \xe7\xaa\xb6\xe3\x83\xbbeak rankers' on the basis of re-weighted training data and finally linearly combines the weak rankers for making ranking predictions."],
   [['METHOD'],
    'We prove that the training process of AdaRank is exactly that of enhancing the performance measure used.'],
   [['RESULT'],
    'Experimental results on four benchmark datasets show that AdaRank significantly outperforms the baseline methods of BM25, Ranking SVM, and RankBoost.']],
  [[['BACKGROUND'],
    'Spam is a key problem in electronic communication, including large-scale email systems and the growing number of blogs.'],
   [['BACKGROUND'],
    'Content-based filtering is one reliable method of combating this threat in its various forms, but some academic researchers and industrial practitioners disagree on how best to filter spam.'],
   [['BACKGROUND'],
    'The former have advocated the use of Support Vector Machines (SVMs) for content-based filtering, as this machine learning methodology gives state-of-the-art performance for text classification.'],
   [['BACKGROUND'],
    'However, similar performance gains have yet to be demonstrated for online spam filtering.'],
   [['BACKGROUND'],
    'Additionally, practitioners cite the high cost of SVMs as reason to prefer faster (if less statistically robust) Bayesian methods.'],
   [['OBJECTIVE'],
    'In this paper, we offer a resolution to this controversy.'],
   [['METHOD', 'RESULT'],
    'First, we show that online SVMs indeed give state-of-the-art classification performance on online spam filtering on large benchmark data sets.'],
   [['METHOD', 'RESULT'],
    'Second, we show that nearly equivalent performance may be achieved by a Relaxed Online SVM (ROSVM) at greatly reduced computational cost.'],
   [['METHOD'],
    'Our results are experimentally verified on email spam, blog spam, and splog detection tasks.']],
  [[['BACKGROUND'],
    'While the PageRank algorithm has proven to be very effective for ranking Web pages, the rank scores of Web pages can be manipulated.'],
   [['OBJECTIVE'],
    'To handle the manipulation problem and to cast a new insight on the Web structure, we propose a ranking algorithm called DiffusionRank.'],
   [['METHOD'],
    'DiffusionRank is motivated by the heat diffusion phenomena, which can be connected to Web ranking because the activities flow on the Web can be imagined as heat flow, the link from a page to another can be treated as the pipe of an air-conditioner, and heat flow can embody the structure of the underlying Web graph.'],
   [['METHOD'],
    'Theoretically we show that DiffusionRank can serve as a generalization of PageRank when the heat diffusion coefficient \xef\xbe\x8e\xef\xbd\xb3 tends to infinity.'],
   [['METHOD'],
    'In such a case 1/\xef\xbe\x8e\xef\xbd\xb3 = 0, DiffusionRank (PageRank) has low ability of anti-manipulation.'],
   [['METHOD'],
    'When \xef\xbe\x8e\xef\xbd\xb3 = 0, DiffusionRank obtains the highest ability of anti-manipulation, but in such a case, the web structure is completely ignored.'],
   [['METHOD'],
    'Consequently, \xef\xbe\x8e\xef\xbd\xb3 is an interesting factor that can control the balance between the ability of preserving the original Web and the ability of reducing the effect of manipulation.'],
   [['METHOD', 'RESULT'],
    'It is found empirically that, when \xef\xbe\x8e\xef\xbd\xb3 = 1, DiffusionRank has a Penicillin-like effect on the link manipulation.'],
   [['METHOD', 'RESULT'],
    'Moreover, DiffusionRank can be employed to find group-to-group relations on the Web, to divide the Web graph into several parts, and to find link communities.'],
   [['RESULT'],
    'Experimental results show that the DiffusionRank algorithm achieves the above mentioned advantages as expected.']],
  [[['BACKGROUND'],
    'Query suggestion aims to suggest relevant queries for a given query, which help users better specify their information needs.'],
   [['BACKGROUND'],
    'Previously, the suggested terms are mostly in the same language of the input query.'],
   [['OBJECTIVE'],
    'In this paper, we extend it to cross-lingual query suggestion (CLQS): for a query in one language, we suggest similar or relevant queries in other languages.'],
   [['OBJECTIVE'],
    'This is very important to scenarios of cross-language information retrieval (CLIR) and cross-lingual keyword bidding for search engine advertisement.'],
   [['METHOD'],
    'Instead of relying on existing query translation technologies for CLQS, we present an effective means to map the input query of one language to queries of the other language in the query log.'],
   [['METHOD'],
    'Important monolingual and cross-lingual information such as word translation relations and word co-occurrence statistics, etc. are used to estimate the cross-lingual query similarity with a discriminative model.'],
   [['RESULT'],
    'Benchmarks show that the resulting CLQS system significantly outperforms a baseline system based on dictionary-based query translation.'],
   [['METHOD'],
    'Besides, the resulting CLQS is tested with French to English CLIR tasks on TREC collections.'],
   [['RESULT'],
    'The results demonstrate higher effectiveness than the traditional query translation methods.']],
  [[['OBJECTIVE'],
    'This paper describes a large-scale evaluation of the effectiveness of HITS in comparison with other link-based ranking algorithms, when used in combination with a state-of-the-art text retrieval algorithm exploiting anchor text.'],
   [['METHOD'],
    'We quantified their effectiveness using three common performance measures: the mean reciprocal rank, the mean average precision, and the normalized discounted cumulative gain measurements.'],
   [['METHOD'],
    'The evaluation is based on two large data sets: a breadth-first search crawl of 463 million web pages containing 17.6 billion hyperlinks and referencing 2.9 billion distinct URLs; and a set of 28,043 queries sampled from a query log, each query having on average 2,383 results, about 17 of which were labeled by judges.'],
   [['RESULT'],
    'We found that HITS outperforms PageRank, but is about as effective as web-page in-degree.'],
   [['RESULT'],
    'The same holds true when any of the link-based features are combined with the text retrieval algorithm.'],
   [['RESULT'],
    'Finally, we studied the relationship between query specificity and the effectiveness of selected features, and found that link-based features perform better for general queries, whereas BM25F performs better for specific queries.']],
  [[['OBJECTIVE'],
    'We propose a novel method of analysing data gathered from TREC or similar information retrieval evaluation experiments.'],
   [['METHOD'],
    'We define two normalized versions of average precision, that we use to construct a weighted bipartite graph of TREC systems and topics.'],
   [['METHOD'],
    'We analyze the meaning of well known -- and somewhat generalized -- indicators from social network analysis on the Systems-Topics graph.'],
   [['RESULT'],
    'We apply this method to an analysis of TREC 8 data; among the results, we find that authority measures systems performance, that hubness of topics reveals that some topics are better than others at distinguishing more or less effective systems, that with current measures a system that wants to be effective in TREC needs to be effective on easy topics, and that by using different effectiveness measures this is no longer the case.']],
  [[['BACKGROUND'],
    'The world wide web contains rich textual contents that are interconnected via complex hyperlinks.'],
   [['BACKGROUND'],
    'This huge database violates the assumption held by most of conventional statistical methods that each web page is considered as an independent and identical sample.'],
   [['BACKGROUND'],
    'It is thus difficult to apply traditional mining or learning methods for solving web mining problems, e.g., web page classification, by exploiting both the content and the link structure.'],
   [['BACKGROUND'],
    'The research in this direction has recently received considerable attention but are still in an early stage.'],
   [['BACKGROUND'],
    'Though a few methods exploit both the link structure or the content information, some of them combine the only authority information with the content information, and the others first decompose the link structure into hub and authority features, then apply them as additional document features.'],
   [['OBJECTIVE', 'METHOD'],
    'Being practically attractive for its great simplicity, this paper aims to design an algorithm that exploits both the content and linkage information, by carrying out a joint factorization on both the linkage adjacency matrix and the document-term matrix, and derives a new representation for web pages in a low-dimensional factor space, without explicitly separating them as content, hub or authority factors.'],
   [['METHOD'],
    'Further analysis can be performed based on the compact representation of web pages.'],
   [['RESULT'],
    'In the experiments, the proposed method is compared with state-of-the-art methods and demonstrates an excellent accuracy in hypertext classification on the WebKB and Cora benchmarks.']],
  [[['BACKGROUND'],
    'Text search over temporally versioned document collections such as web archives has received little attention as a research problem.'],
   [['BACKGROUND'],
    'As a consequence, there is no scalable and principled solution to search such a collection as of a specified time t.'],
   [['OBJECTIVE'],
    'In this work, we address this shortcoming and propose an efficient solution for time-travel text search by extending the inverted file index to make it ready for temporal search.'],
   [['METHOD'],
    'We introduce approximate temporal coalescing as a tunable method to reduce the index size without significantly affecting the quality of results.'],
   [['METHOD'],
    'In order to further improve the performance of time-travel queries, we introduce two principled techniques to trade off index size for its performance.'],
   [['METHOD'],
    'These techniques can be formulated as optimization problems that can be solved to near-optimality.'],
   [['METHOD'],
    'Finally, our approach is evaluated in a comprehensive series of experiments on two large-scale real-world datasets.'],
   [['RESULT'],
    'Results unequivocally show that our methods make it possible to build an efficient time machine scalable to large versioned text collections.']],
  [[['BACKGROUND'],
    'Current prediction techniques, which are generally designed for content-based queries and are typically evaluated on relatively homogenous test collections of small sizes, face serious challenges in web search environments where collections are significantly more heterogeneous and different types of retrieval tasks exist.'],
   [['OBJECTIVE'],
    'In this paper, we present three techniques to address these challenges.'],
   [['METHOD'],
    'We focus on performance prediction for two types of queries in web search environments: content-based and Named-Page finding.'],
   [['METHOD'], 'Our evaluation is mainly performed on the GOV2 collection.'],
   [['METHOD'],
    'In addition to evaluating our models for the two types of queries separately, we consider a more challenging and realistic situation that the two types of queries are mixed together without prior information on query types.'],
   [['METHOD'],
    'To assist prediction under the mixed-query situation, a novel query classifier is adopted.'],
   [['RESULT'],
    'Results show that our prediction of web query performance is substantially more accurate than the current state-of-the-art prediction techniques.'],
   [['RESULT'],
    'Consequently, our paper provides a practical approach to performance prediction in real-world web settings.']],
  [[['BACKGROUND'],
    'Expertise retrieval has been largely unexplored on data other than the W3C collection.'],
   [['BACKGROUND'],
    'At the same time, many intranets of universities and other knowledge-intensive organisations offer examples of relatively small but clean multilingual expertise data, covering broad ranges of expertise areas.'],
   [['OBJECTIVE', 'METHOD'],
    'We first present two main expertise retrieval tasks, along with a set of baseline approaches based on generative language modeling, aimed at finding expertise relations between topics and people.'],
   [['METHOD'],
    'For our experimental evaluation, we introduce (and release) a new test set based on a crawl of a university site.'],
   [['METHOD'], 'Using this test set, we conduct two series of experiments.'],
   [['METHOD'],
    'The first is aimed at determining the effectiveness of baseline expertise retrieval methods applied to the new test set.'],
   [['METHOD'],
    'The second is aimed at assessing refined models that exploit characteristic features of the new test set, such as the organizational structure of the university, and the hierarchical structure of the topics in the test set.'],
   [['RESULT'],
    'Expertise retrieval models are shown to be robust with respect to environments smaller than the W3C collection, and current techniques appear to be generalizable to other settings.']],
  [[['BACKGROUND'],
    'Contextual advertising or Context Match (CM) refers to the placement of commercial textual advertisements within the content of a generic web page, while Sponsored Search (SS) advertising consists in placing ads on result pages from a web search engine, with ads driven by the originating query.'],
   [['BACKGROUND'],
    'In CM there is usually an intermediary commercial ad-network entity in charge of optimizing the ad selection with the twin goal of increasing revenue (shared between the publisher and the ad-network) and improving the user experience.'],
   [['BACKGROUND'],
    'With these goals in mind it is preferable to have ads relevant to the page content, rather than generic ads.'],
   [['BACKGROUND'],
    'The SS market developed quicker than the CM market, and most textual ads are still characterized by bid phrases representing those queries where the advertisers would like to have their ad displayed.'],
   [['BACKGROUND'],
    'Hence, the first technologies for CM have relied on previous solutions for SS, by simply extracting one or more phrases from the given page content, and displaying ads corresponding to searches on these phrases, in a purely syntactic approach.'],
   [['BACKGROUND'],
    'However, due to the vagaries of phrase extraction, and the lack of context, this approach leads to many irrelevant ads.'],
   [['OBJECTIVE'],
    'To overcome this problem, we propose a system for contextual ad matching based on a combination of semantic and syntactic features.']],
  [[['BACKGROUND'],
    'The effectiveness of information retrieval (IR) systems is influenced by the degree of term overlap between user queries and relevant documents.'],
   [['BACKGROUND'],
    'Query-document term mismatch, whether partial or total, is a fact that must be dealt with by IR systems.'],
   [['BACKGROUND'],
    'Query Expansion (QE) is one method for dealing with term mismatch.'],
   [['BACKGROUND'],
    'IR systems implementing query expansion are typically evaluated by executing each query twice, with and without query expansion, and then comparing the two result sets.'],
   [['BACKGROUND'],
    'While this measures an overall change in performance, it does not directly measure the effectiveness of IR systems in overcoming the inherent issue of term mismatch between the query and relevant documents, nor does it provide any insight into how such systems would behave in the presence of query-document term mismatch.'],
   [['OBJECTIVE'],
    'In this paper, we propose a new approach for evaluating query expansion techniques.'],
   [['RESULT'],
    'The proposed approach is attractive because it provides an estimate of system performance under varying degrees of query-document term mismatch, it makes use of readily available test collections, and it does not require any additional relevance judgments or any form of manual processing.']],
  [[['BACKGROUND'],
    'Evaluation of information retrieval systems is one of the core tasks in information retrieval.'],
   [['BACKGROUND'],
    'Problems include the inability to exhaustively label all documents for a topic, nongeneralizability from a small number of topics, and incorporating the variability of retrieval systems.'],
   [['BACKGROUND'],
    'Previous work addresses the evaluation of systems, the ranking of queries by difficulty, and the ranking of individual retrievals by performance.'],
   [['BACKGROUND'],
    'Approaches exist for the case of few and even no relevance judgments.'],
   [['OBJECTIVE'],
    'Our focus is on zero-judgment performance prediction of individual retrievals.'],
   [['BACKGROUND', 'METHOD'],
    'One common shortcoming of previous techniques is the assumption of uncorrelated document scores and judgments.'],
   [['METHOD'],
    'If documents are embedded in a high-dimensional space (as they often are), we can apply techniques from spatial data analysis to detect correlations between document scores.'],
   [['RESULT'],
    'We find that the low correlation between scores of topically close documents often implies a poor retrieval performance.'],
   [['RESULT'],
    'When compared to a state of the art baseline, we demonstrate that the spatial analysis of retrieval scores provides significantly better prediction performance.'],
   [['RESULT'],
    'These new predictors can also be incorporated with classic predictors to improve performance further.'],
   [['METHOD'],
    'We also describe the first large-scale experiment to evaluate zero-judgment performance prediction for a massive number of retrieval systems over a variety of collections in several languages.']],
  [[['BACKGROUND'],
    'Research in Information Retrieval usually shows performance improvement when many sources of evidence are combined to produce a ranking of documents (e.g., texts, pictures, sounds, etc.).'],
   [['OBJECTIVE'],
    'In this paper, we focus on the rank aggregation problem, also called data fusion problem, where rankings of documents, searched into the same collection and provided by multiple methods, are combined in order to produce a new ranking.'],
   [['METHOD'],
    'In this context, we propose a rank aggregation method within a multiple criteria framework using aggregation mechanisms based on decision rules identifying positive and negative reasons for judging whether a document should get a better rank than another.'],
   [['RESULT'],
    'We show that the proposed method deals well with the Information Retrieval distinctive features.'],
   [['RESULT'],
    'Experimental results are reported showing that the suggested method performs better than the well-known CombSUM and CombMNZ operators.']],
  [[['BACKGROUND'],
    'We are interested in retrieving information from speech data like broadcast news, telephone conversations and roundtable meetings.'],
   [['BACKGROUND'],
    'Today, most systems use large vocabulary continuous speech recognition tools to produce word transcripts; the transcripts are indexed and query terms are retrieved from the index.'],
   [['BACKGROUND'],
    "However, query terms that are not part of the recognizer's vocabulary cannot be retrieved, and the recall of the search is affected."],
   [['BACKGROUND'],
    'In addition to the output word transcript, advanced systems provide also phonetic transcripts, against which query terms can be matched phonetically.'],
   [['BACKGROUND'],
    'Such phonetic transcripts suffer from lower accuracy and cannot be an alternative to word transcripts.'],
   [['OBJECTIVE'],
    'We present a vocabulary independent system that can handle arbitrary queries, exploiting the information provided by having both word transcripts and phonetic transcripts.'],
   [['METHOD'],
    'A speech recognizer generates word confusion networks and phonetic lattices.'],
   [['METHOD'],
    'The transcripts are indexed for query processing and ranking purpose.'],
   [['RESULT'],
    'The value of the proposed method is demonstrated by the relative high performance of our system, which received the highest overall ranking for US English speech data in the recent NIST Spoken Term Detection evaluation [1].']],
  [[['BACKGROUND'],
    'Traditionally, stemming has been applied to Information Retrieval tasks by transforming words in documents to the their root form before indexing, and applying a similar transformation to query terms.'],
   [['BACKGROUND'],
    'Although it increases recall, this naive strategy does not work well for Web Search since it lowers precision and requires a significant amount of additional computation.'],
   [['OBJECTIVE'],
    'In this paper, we propose a context sensitive stemming method that addresses these two issues.'],
   [['METHOD'],
    'Two unique properties make our approach feasible for Web Search.'],
   [['METHOD'],
    'First, based on statistical language modeling, we perform context sensitive analysis on the query side.'],
   [['METHOD'],
    'We accurately predict which of its morphological variants is useful to expand a query term with before submitting the query to the search engine.'],
   [['METHOD'],
    'This dramatically reduces the number of bad expansions, which in turn reduces the cost of additional computation and improves the precision at the same time.'],
   [['METHOD'],
    'Second, our approach performs a context sensitive document matching for those expanded variants.'],
   [['METHOD'],
    'This conservative strategy serves as a safeguard against spurious stemming, and it turns out to be very important for improving precision.'],
   [['RESULT'],
    'Using word pluralization handling as an example of our stemming approach, our experiments on a major Web search engine show that stemming only 29% of the query traffic, we can improve relevance as measured by average Discounted Cumulative Gain (DCG5) by 6.1% on these queries and 1.8% over all query traffic.']],
  [[['OBJECTIVE'],
    'This paper presents a study of incorporating domain-specific knowledge (i.e., information about concepts and relationships between concepts in a certain domain) in an information retrieval (IR) system to improve its effectiveness in retrieving biomedical literature.'],
   [['METHOD'],
    'The effects of different types of domain-specific knowledge in performance contribution are examined.'],
   [['RESULT'],
    'Based on the TREC platform, we show that appropriate use of domain-specific knowledge in a proposed conceptual retrieval model yields about 23% improvement over the best reported result in passage retrieval in the Genomics Track of TREC 2006.']],
  [[['OBJECTIVE'],
    'This paper reports on theoretical investigations about the assumptions underlying the inverse document frequency (idf).'],
   [['METHOD'],
    'We show that an intuitive idf-based probability function for the probability of a term being informative assumes disjoint document events.'],
   [['METHOD'],
    'By assuming documents to be independent rather than disjoint, we arrive at a Poisson-based probability of being informative.'],
   [['RESULT'],
    'The framework is useful for understanding and deciding the parameter estimation and combination in probabilistic retrieval models.']],
  [[['BACKGROUND'],
    'The current boom of the Web is associated with the revenues originated from on-line advertising.'],
   [['BACKGROUND'],
    'While search-based advertising is dominant, the association of ads with a Web page (during user navigation) is becoming increasingly important.'],
   [['OBJECTIVE'],
    'In this work, we study the problem of associating ads with a Web page, referred to as content-targeted advertising, from a computer science perspective.'],
   [['OBJECTIVE'],
    "We assume that we have access to the text of the Web page, the keywords declared by an advertiser, and a text associated with the advertiser's business."],
   [['OBJECTIVE'],
    'Using no other information and operating in fully automatic fashion, we propose ten strategies for solving the problem and evaluate their effectiveness.'],
   [['METHOD', 'RESULT'],
    'Our methods indicate that a matching strategy that takes into account the semantics of the problem (referred to as AAK for ads and keywords) can yield gains in average precision figures of 60% compared to a trivial vector-based strategy.'],
   [['METHOD', 'RESULT'],
    'Further, a more sophisticated impedance coupling strategy, which expands the text of the Web page to reduce vocabulary impedance with regard to an advertisement, can yield extra gains in average precision of 50%.'],
   [['RESULT'],
    'They suggest that great accuracy in content-targeted advertising can be attained with appropriate algorithms.']],
  [[['BACKGROUND'],
    'Information retrieval systems (e.g., web search engines) are critical for overcoming information overload.'],
   [['BACKGROUND'],
    'A major deficiency of existing retrieval systems is that they generally lack user modeling and are not adaptive to individual users, resulting in inherently non-optimal retrieval performance.'],
   [['BACKGROUND'],
    'For example, a tourist and a programmer may use the same word java to search for different information, but the current search systems would return the same results.'],
   [['OBJECTIVE'],
    "In this paper, we study how to infer a user's interest from the user's search context and use the inferred implicit user model for personalized search."],
   [['METHOD'],
    'We present a decision theoretic framework and develop techniques for implicit user modeling in information retrieval.'],
   [['METHOD'],
    'We develop an intelligent client-side web search agent (UCAIR) that can perform eager implicit feedback, e.g., query expansion based on previous queries and immediate result reranking based on clickthrough information.'],
   [['RESULT'],
    'Experiments on web search show that our search agent can improve search accuracy over the popular Google search engine.']],
  [[['OBJECTIVE', 'METHOD'],
    'This paper proposes a framework for agent-based distributed machine learning and data mining based on (i) the exchange of meta-level descriptions of individual learning processes among agents and (ii) online reasoning about learning success and learning progress by learning agents.'],
   [['METHOD'],
    'We present an abstract architecture that enables agents to exchange models of their local learning processes and introduces a number of different methods for integrating these processes.'],
   [['RESULT'],
    'This allows us to apply existing agent interaction mechanisms to distributed machine learning tasks, thus leveraging the powerful coordination methods available in agent-based computing, and enables agents to engage in meta-reasoning about their own learning decisions.'],
   [['METHOD'],
    'We apply this architecture to a real-world distributed clustering application to illustrate how the conceptual framework can be used in practical systems in which different learners may be using different datasets, hypotheses and learning algorithms.']],
  [[['BACKGROUND'],
    'Distributed allocation and multiagent coordination problems can be solved through combinatorial auctions.'],
   [['BACKGROUND'],
    'However, most of the existing winner determination algorithms for combinatorial auctions are centralized.'],
   [['BACKGROUND'],
    'The PAUSE auction is one of a few efforts to release the auctioneer from having to do all the work (it might even be possible to get rid of the auctioneer).'],
   [['BACKGROUND'],
    'It is an increasing price combinatorial auction that naturally distributes the problem of winner determination amongst the bidders in such a way that they have an incentive to perform the calculation.'],
   [['BACKGROUND'],
    'It can be used when we wish to distribute the computational load among the bidders or when the bidders do not wish to reveal their true valuations unless necessary.'],
   [['BACKGROUND'], 'PAUSE establishes the rules the bidders must obey.'],
   [['BACKGROUND'],
    'However, it does not tell us how the bidders should calculate their bids.'],
   [['OBJECTIVE'],
    'We have developed a couple of bidding algorithms for the bidders in a PAUSE auction.'],
   [['OBJECTIVE'],
    "Our algorithms always return the set of bids that maximizes the bidder's utility."],
   [['RESULT'],
    'Since the problem is NP-Hard, run time remains exponential on the number of items, but it is remarkably better than an exhaustive search.']],
  [[['BACKGROUND'],
    'Distributed Constraint Optimization (DCOP) is a general framework that can model complex problems in multi-agent systems.'],
   [['BACKGROUND'],
    'Several current algorithms that solve general DCOP instances, including ADOPT and DPOP, arrange agents into a traditional pseudotree structure.'],
   [['OBJECTIVE'],
    'We introduce an extension to the DPOP algorithm that handles an extended set of pseudotree arrangements.'],
   [['OBJECTIVE'],
    'Our algorithm correctly solves DCOP instances for pseudotrees that include edges between nodes in separate branches.'],
   [['OBJECTIVE'],
    'The algorithm also solves instances with traditional pseudotree arrangements using the same procedure as DPOP.'],
   [['METHOD'],
    'We compare our algorithm with DPOP using several metrics including the induced width of the pseudotrees, the maximum dimensionality of messages and computation, and the maximum sequential path cost through the algorithm.'],
   [['METHOD'],
    'We prove that for some problem instances it is not possible to generate a traditional pseudotree using edge-traversal heuristics that will outperform a cross-edged pseudotree.'],
   [['METHOD'],
    'We use multiple heuristics to generate pseudotrees and choose the best pseudotree in linear space-time complexity.'],
   [['RESULT'],
    'For some problem instances we observe significant improvements in message and computation sizes compared to DPOP.']],
  [[['OBJECTIVE'],
    'In this paper we introduce Dynamics Based Control (DBC), an approach to planning and control of an agent in stochastic environments.'],
   [['METHOD'],
    'Unlike existing approaches, which seek to optimize expected rewards (e.g., in Partially Observable Markov Decision Problems (POMDPs)), DBC optimizes system behavior towards specified system dynamics.'],
   [['METHOD'],
    'We show that a recently developed planning and control approach, Extended Markov Tracking (EMT) is an instantiation of DBC.'],
   [['METHOD'],
    'EMT employs greedy action selection to provide an efficient control algorithm in Markovian environments.'],
   [['METHOD'],
    'We exploit this efficiency in a set of experiments that applied multitarget EMT to a class of area-sweeping problems (searching for moving targets).'],
   [['RESULT'],
    'We show that such problems can be naturally defined and efficiently solved using the DBC framework, and its EMT instantiation.']],
  [[['BACKGROUND'],
    'Although agent interaction plays a vital role in MAS, and message-centric approaches to agent interaction have their drawbacks, present agent-oriented programming languages do not provide support for implementing agent interaction that is flexible and robust.'],
   [['BACKGROUND'],
    'Instead, messages are provided as a primitive building block.'],
   [['OBJECTIVE'],
    'In this paper we consider one approach for modelling agent interactions: the commitment machines framework.'],
   [['OBJECTIVE'],
    'This framework supports modelling interactions at a higher level (using social commitments), resulting in more flexible interactions.'],
   [['METHOD'],
    'We investigate how commitment-based interactions can be implemented in conventional agent-oriented programming languages.'],
   [['RESULT'],
    'The contributions of this paper are: a mapping from a commitment machine to a collection of BDI-style plans; extensions to the semantics of BDI programming languages; and an examination of two issues that arise when distributing commitment machines (turn management and race conditions) and solutions to these problems.']],
  [[['OBJECTIVE'],
    'We propose a new class of representations that can be used for modeling (and model checking) temporal, strategic and epistemic properties of agents and their teams.'],
   [['METHOD'],
    'Our representations borrow the main ideas from interpreted systems of Halpern, Fagin et al.; however, they are also modular and compact in the way concurrent programs are.'],
   [['METHOD'],
    'We also mention preliminary results on model checking alternating-time temporal logic for this natural class of models.']],
  [[['BACKGROUND'],
    'The social stance advocated by institutional frameworks and most multi-agent system methodologies has resulted in a wide spectrum of organizational and communicative abstractions which have found currency in several programming frameworks and software platforms.'],
   [['BACKGROUND'],
    'Still, these tools and frameworks are designed to support a limited range of interaction capabilities that constrain developers to a fixed set of particular, pre-defined abstractions.'],
   [['OBJECTIVE'],
    'The main hypothesis motivating this paper is that the variety of multi-agent interaction mechanisms -- both, organizational and communicative, share a common semantic core.'],
   [['OBJECTIVE'],
    'In the realm of software architectures, the paper proposes a connector-based model of multi-agent interactions which attempts to identify the essential structure underlying multi-agent interactions.'],
   [['OBJECTIVE'],
    'Furthermore, the paper also provides this model with a formal execution semantics which describes the dynamics of social interactions.'],
   [['OBJECTIVE'],
    'The proposed model is intended as the abstract machine of an organizational programming language which allows programmers to accommodate an open set of interaction mechanisms.']],
  [[['OBJECTIVE'],
    'We develop a model of normative systems in which agents are assumed to have multiple goals of increasing priority, and investigate the computational complexity and game theoretic properties of this model.'],
   [['METHOD'],
    'In the underlying model of normative systems, we use Kripke structures to represent the possible transitions of a multi-agent system.'],
   [['METHOD'],
    'A normative system is then simply a subset of the Kripke structure, which contains the arcs that are forbidden by the normative system.'],
   [['METHOD'],
    "We specify an agent's goals as a hierarchy of formulae of Computation Tree Logic (CTL), a widely used logic for representing the properties of Kripke structures: the intuition is that goals further up the hierarchy are preferred by the agent over those that appear further down the hierarchy."],
   [['METHOD'],
    'Using this scheme, we define a model of ordinal utility, which in turn allows us to interpret our Kripke-based normative systems as games, in which agents must determine whether to comply with the normative system or not.'],
   [['METHOD', 'RESULT'],
    'We then characterise the computational complexity of a number of decision problems associated with these Kripke-based normative system games; for example, we show that the complexity of checking whether there exists a normative system which has the property of being a Nash implementation is NP-complete.']],
  [[['OBJECTIVE'],
    'In this paper, we present a new protocol to address multilateral multi-issue negotiation in a cooperative context.'],
   [['METHOD'],
    'We consider complex dependencies between multiple issues by modelling the preferences of the agents with a multi-criteria decision aid tool, also enabling us to extract relevant information on a proposal assessment.'],
   [['METHOD'],
    'This information is used in the protocol to help in accelerating the search for a consensus between the cooperative agents.'],
   [['METHOD'],
    'In addition, the negotiation procedure is defined in a crisis management context where the common objective of our agents is also considered in the preferences of a mediator agent.']],
  [[['BACKGROUND'],
    'Logics of knowledge and belief are often too static and inflexible to be used on real-world problems.'],
   [['BACKGROUND'],
    'In particular, they usually offer no concept for expressing that some course of events is more likely to happen than another.'],
   [['OBJECTIVE', 'METHOD'],
    'We address this problem and extend CTLK (computation tree logic with knowledge) with a notion of plausibility, which allows for practical and counterfactual reasoning.'],
   [['METHOD'],
    'The new logic CTLKP (CTLK with plausibility) includes also a particular notion of belief.'],
   [['METHOD'],
    'A plausibility update operator is added to this logic in order to change plausibility assumptions dynamically.'],
   [['METHOD'],
    'Furthermore, we examine some important properties of these concepts.'],
   [['RESULT'],
    'In particular, we show that, for a natural class of models, belief is a KD45 modality.'],
   [['RESULT'],
    'We also show that model checking CTLKP is PTIME-complete and can be done in time linear with respect to the size of models and formulae.']],
  [[['OBJECTIVE'],
    'In this paper we will present an argumentation framework for learning agents (AMAL) designed for two purposes: (1) for joint deliberation, and (2) for learning from communication.'],
   [['METHOD'],
    'The AMAL framework is completely based on learning from examples: the argument preference relation, the argument generation policy, and the counterargument generation policy are case-based techniques.'],
   [['METHOD'],
    'For join deliberation, learning agents share their experience by forming a committee to decide upon some joint decision.'],
   [['RESULT'],
    'We experimentally show that the argumentation among committees of agents improves both the individual and joint performance.'],
   [['RESULT'],
    'For learning from communication, an agent engages into arguing with other agents in order to contrast its individual hypotheses and receive counterexamples; the argumentation process improves their learning scope and individual performance.']],
  [[['OBJECTIVE'],
    'This paper proposes a unified and general framework for argumentation-based negotiation, in which the role of argumentation is formally analyzed.'],
   [['RESULT'],
    'The framework makes it possible to study the outcomes of an argumentation-based negotiation.'],
   [['RESULT'],
    'It shows what an agreement is, how it is related to the theories of the agents, when it is possible, and how this can be attained by the negotiating agents in this case.'],
   [['RESULT'],
    'It defines also the notion of concession, and shows in which situation an agent will make one, as well as how it influences the evolution of the dialogue.']],
  [[['BACKGROUND'],
    'The Shapley value is one of the key solution concepts for coalition games.'],
   [['BACKGROUND'],
    'Its main advantage is that it provides a unique and fair solution, but its main problem is that, for many coalition games, the Shapley value cannot be determined in polynomial time.'],
   [['BACKGROUND'],
    'In particular, the problem of finding this value for the voting game is known to be #P-complete in the general case.'],
   [['OBJECTIVE'],
    'However, in this paper, we show that there are some specific voting games for which the problem is computationally tractable.'],
   [['METHOD'],
    'For other general voting games, we overcome the problem of computational complexity by presenting a new randomized method for determining the approximate Shapley value.'],
   [['METHOD'],
    'The time complexity of this method is linear in the number of players.'],
   [['RESULT'],
    'We also show, through empirical studies, that the percentage error for the proposed method is always less than 20% and, in most cases, less than 5%.']],
  [[['OBJECTIVE'],
    'This paper analyzes bilateral multi-issue negotiation between self-interested autonomous agents.'],
   [['OBJECTIVE'],
    'The agents have time constraints in the form of both deadlines and discount factors.'],
   [['OBJECTIVE'],
    'There are m > 1 issues for negotiation where each issue is viewed as a pie of size one.'],
   [['OBJECTIVE'],
    'The issues are indivisible (i.e., individual issues cannot be split between the parties; each issue must be allocated in its entirety to either agent).'],
   [['OBJECTIVE'],
    'Here different agents value different issues differently.'],
   [['OBJECTIVE'],
    'Thus, the problem is for the agents to decide how to allocate the issues between themselves so as to maximize their individual utilities.'],
   [['METHOD'],
    'For such negotiations, we first obtain the equilibrium strategies for the case where the issues for negotiation are known a priori to the parties.'],
   [['METHOD'],
    'Then, we analyse their time complexity and show that finding the equilibrium offers is an NP-hard problem, even in a complete information setting.'],
   [['METHOD'],
    'In order to overcome this computational complexity, we then present negotiation strategies that are approximately optimal but computationally efficient, and show that they form an equilibrium.'],
   [['METHOD'],
    'We also analyze the relative error (i.e., the difference between the true optimum and the approximate).'],
   [['METHOD', 'RESULT'],
    'The time complexity of the approximate equilibrium strategies is O(nm/ 2 ) where n is the negotiation deadline and the relative error.'],
   [['METHOD'],
    'Finally, we extend the analysis to online negotiation where different issues become available at different time points and the agents are uncertain about their valuations for these issues.'],
   [['METHOD'],
    'Specifically, we show that an approximate equilibrium exists for online negotiation and show that the expected difference between the optimum and the approximate is O( \xe7\xab\x8f\xe3\x83\xbbm) .'],
   [['METHOD', 'RESULT'],
    'These approximate strategies also have polynomial time complexity.']],
  [[['BACKGROUND'],
    'It is well established by conflict theorists and others that successful negotiation should incorporate creating value as well as claiming value.'],
   [['BACKGROUND'],
    'Joint improvements that bring benefits to all parties can be realised by (i) identifying attributes that are not of direct conflict between the parties, (ii) tradeoffs on attributes that are valued differently by different parties, and (iii) searching for values within attributes that could bring more gains to one party while not incurring too much loss on the other party.'],
   [['OBJECTIVE', 'METHOD'],
    'In this paper we propose an approach for maximising joint gains in automated negotiations by formulating the negotiation problem as a multi-criteria decision making problem and taking advantage of several optimisation techniques introduced by operations researchers and conflict theorists.'],
   [['METHOD'],
    'We use a mediator to protect the negotiating parties from unnecessary disclosure of information to their opponent, while also allowing an objective calculation of maximum joint gains.'],
   [['METHOD', 'RESULT'],
    'We separate out attributes that take a finite set of values (simple attributes) from those with continuous values, and we show that for simple attributes, the mediator can determine the Pareto-optimal values.'],
   [['RESULT'],
    'In addition we show that if none of the simple attributes strongly dominates the other simple attributes, then truth telling is an equilibrium strategy for negotiators during the optimisation of simple attributes.'],
   [['OBJECTIVE', 'METHOD'],
    'We also describe an approach for improving joint gains on non-simple attributes, by moving the parties in a series of steps, towards the Pareto-optimal frontier.']],
  [[['OBJECTIVE'],
    'This paper presents a novel, unified distributed constraint satisfaction framework based on automated negotiation.'],
   [['OBJECTIVE'],
    'The Distributed Constraint Satisfaction Problem (DCSP) is one that entails several agents to search for an agreement, which is a consistent combination of actions that satisfies their mutual constraints in a shared environment.'],
   [['METHOD', 'RESULT'],
    'By anchoring the DCSP search on automated negotiation, we show that several well-known DCSP algorithms are actually mechanisms that can reach agreements through a common Belief-Desire-Intention (BDI) protocol, but using different strategies.'],
   [['OBJECTIVE'],
    'A major motivation for this BDI framework is that it not only provides a conceptually clearer understanding of existing DCSP algorithms from an agent model perspective, but also opens up the opportunities to extend and develop new strategies for DCSP.'],
   [['OBJECTIVE'],
    'To this end, a new strategy called Unsolicited Mutual Advice (UMA) is proposed.'],
   [['RESULT'],
    'Performance evaluation shows that the UMA strategy can outperform some existing mechanisms in terms of computational cycles.']],
  [[['OBJECTIVE'],
    'In this paper we develop a novel probabilistic model of computational trust that explicitly deals with correlated multi-dimensional contracts.'],
   [['METHOD'],
    'Our starting point is to consider an agent attempting to estimate the utility of a contract, and we show that this leads to a model of computational trust whereby an agent must determine a vector of estimates that represent the probability that any dimension of the contract will be successfully fulfilled, and a covariance matrix that describes the uncertainty and correlations in these probabilities.'],
   [['METHOD'],
    'We present a formalism based on the Dirichlet distribution that allows an agent to calculate these probabilities and correlations from their direct experience of contract outcomes, and we show that this leads to superior estimates compared to an alternative approach using multiple independent beta distributions.'],
   [['METHOD'],
    'We then show how agents may use the sufficient statistics of this Dirichlet distribution to communicate and fuse reputation within a decentralised reputation system.'],
   [['METHOD'],
    'Finally, we present a novel solution to the problem of rumour propagation within such systems.'],
   [['METHOD'],
    'This solution uses the notion of private and shared information, and provides estimates consistent with a centralised reputation system, whilst maintaining the anonymity of the agents, and avoiding bias and overconfidence.']],
  [[['BACKGROUND'],
    'In adversarial multiagent domains, security, commonly defined as the ability to deal with intentional threats from other agents, is a critical issue.'],
   [['BACKGROUND', 'OBJECTIVE'],
    'This paper focuses on domains where these threats come from unknown adversaries.'],
   [['BACKGROUND'],
    'These domains can be modeled as Bayesian games; much work has been done on finding equilibria for such games.'],
   [['BACKGROUND'],
    'However, it is often the case in multiagent security domains that one agent can commit to a mixed strategy which its adversaries observe before choosing their own strategies.'],
   [['BACKGROUND'],
    'In this case, the agent can maximize reward by finding an optimal strategy, without requiring equilibrium.'],
   [['BACKGROUND'],
    'Previous work has shown this problem of optimal strategy selection to be NP-hard.'],
   [['OBJECTIVE'],
    'Therefore, we present a heuristic called ASAP, with three key advantages to address the problem.'],
   [['METHOD'],
    'First, ASAP searches for the highest-reward strategy, rather than a Bayes-Nash equilibrium, allowing it to find feasible strategies that exploit the natural first-mover advantage of the game.'],
   [['METHOD'],
    'Second, it provides strategies which are simple to understand, represent, and implement.'],
   [['METHOD'],
    'Third, it operates directly on the compact, Bayesian game representation, without requiring conversion to normal form.'],
   [['METHOD', 'RESULT'],
    'We provide an efficient Mixed Integer Linear Program (MILP) implementation for ASAP, along with experimental results illustrating significant speedups and higher rewards over other approaches.']],
  [[['BACKGROUND'],
    'Recommender Systems are used in various domains to generate personalized information based on personal user data.'],
   [['BACKGROUND'],
    'The ability to preserve the privacy of all participants is an essential requirement of the underlying Information Filtering architectures, because the deployed Recommender Systems have to be accepted by privacy-aware users as well as information and service providers.'],
   [['BACKGROUND'],
    'Existing approaches neglect to address privacy in this multilateral way.'],
   [['OBJECTIVE'],
    'We have developed an approach for privacy-preserving Recommender Systems based on Multi-Agent System technology which enables applications to generate recommendations via various filtering techniques while preserving the privacy of all participants.']],
  [[['BACKGROUND'],
    'As more and more cars are equipped with GPS and Wi-Fi transmitters, it becomes easier to design systems that will allow cars to interact autonomously with each other, e.g., regarding traffic on the roads.'],
   [['BACKGROUND'],
    'Indeed, car manufacturers are already equipping their cars with such devices.'],
   [['OBJECTIVE'],
    'Though, currently these systems are a proprietary, we envision a natural evolution where agent applications will be developed for vehicular systems, e.g., to improve car routing in dense urban areas.'],
   [['METHOD'],
    'Nonetheless, this new technology and agent applications may lead to the emergence of self-interested car owners, who will care more about their own welfare than the social welfare of their peers.'],
   [['METHOD'],
    'These car owners will try to manipulate their agents such that they transmit false data to their peers.'],
   [['METHOD'],
    'Using a simulation environment, which models a real transportation network in a large city, we demonstrate the benefits achieved by self-interested agents if no counter-measures are implemented.']],
  [[['OBJECTIVE'],
    'We investigate the space of two-sided multiattribute auctions, focusing on the relationship between constraints on the offers traders can express through bids, and the resulting computational problem of determining an optimal set of trades.'],
   [['METHOD'],
    'We develop a formal semantic framework for characterizing expressible offers, and show conditions under which the allocation problem can be separated into first identifying optimal pairwise trades and subsequently optimizing combinations of those trades.'],
   [['METHOD'],
    'We analyze the bilateral matching problem while taking into consideration relevant results from multiattribute utility theory.'],
   [['RESULT'],
    'Network flow models we develop for computing global allocations facilitate classification of the problem space by computational complexity, and provide guidance for developing solution algorithms.'],
   [['RESULT'],
    'Experimental trials help distinguish tractable problem classes for proposed solution techniques.']],
  [[['OBJECTIVE'],
    'We study the stability properties of the dynamics of the standard continuous limit-order mechanism that is used in modern equity markets.'],
   [['METHOD'],
    'We ask whether such mechanisms are susceptible to butterfly effects -- the infliction of large changes on common measures of market activity by only small perturbations of the order sequence.'],
   [['METHOD'],
    'We show that the answer depends strongly on whether the market consists of absolute traders (who determine their prices independent of the current order book state) or relative traders (who determine their prices relative to the current bid and ask).'],
   [['METHOD'],
    'We prove that while the absolute trader model enjoys provably strong stability properties, the relative trader model is vulnerable to great instability.'],
   [['RESULT'],
    'Our theoretical results are supported by large-scale experiments using limit order data from INET, a large electronic exchange for NASDAQ stocks.']],
  [[['OBJECTIVE'],
    'A model of providing service in a P2P network is analyzed.'],
   [['METHOD', 'RESULT'],
    'It is shown that by adding a scrip system, a mechanism that admits a reasonable Nash equilibrium that reduces free riding can be obtained.'],
   [['METHOD', 'RESULT'],
    'The effect of varying the total amount of money (scrip) in the system on efficiency (i.e., social welfare) is analyzed, and it is shown that by maintaining the appropriate ratio between the total amount of money and the number of agents, efficiency is maximized.'],
   [['RESULT'],
    'The work has implications for many online systems, not only P2P networks but also a wide variety of online forums for which scrip systems are popular, but formal analyses have been lacking.']],
  [[['BACKGROUND'],
    'In traditional game theory, players are typically endowed with exogenously given knowledge of the structure of the game-either full omniscient knowledge or partial but fixed information.'],
   [['BACKGROUND'],
    'In real life, however, people are often unaware of the utility of taking a particular action until they perform research into its consequences.'],
   [['OBJECTIVE'], 'In this paper, we model this phenomenon.'],
   [['METHOD'],
    'We imagine a player engaged in a questionand-answer session, asking questions both about his or her own preferences and about the state of reality; thus we call this setting Socratic game theory.'],
   [['METHOD'],
    'In a Socratic game, players begin with an a priori probability distribution over many possible worlds, with a different utility function for each world.'],
   [['METHOD'],
    'Players can make queries, at some cost, to learn partial information about which of the possible worlds is the actual world, before choosing an action.'],
   [['METHOD'],
    'We consider two query models: (1) an unobservable-query model, in which players learn only the response to their own queries, and (2) an observable-query model, in which players also learn which queries their opponents made.'],
   [['METHOD'],
    'The results in this paper consider cases in which the underlying worlds of a two-player Socratic game are either constant-sum games or strategically zero-sum games, a class that generalizes constant-sum games to include all games in which the sum of payoffs depends linearly on the interaction between the players.'],
   [['RESULT'],
    'When the underlying worlds are constant sum, we give polynomial-time algorithms to find Nash equilibria in both the observable- and unobservable-query models.'],
   [['RESULT'],
    'When the worlds are strategically zero sum, we give efficient algorithms to find Nash equilibria in unobservable-query Socratic games and correlated equilibria in observable-query Socratic games.']],
  [[['BACKGROUND'],
    'Finding an equilibrium of an extensive form game of imperfect information is a fundamental problem in computational game theory, but current techniques do not scale to large games.'],
   [['OBJECTIVE'],
    'To address this, we introduce the ordered game isomorphism and the related ordered game isomorphic abstraction transformation.'],
   [['METHOD'],
    'For a multi-player sequential game of imperfect information with observable actions and an ordered signal space, we prove that any Nash equilibrium in an abstracted smaller game, obtained by one or more applications of the transformation, can be easily converted into a Nash equilibrium in the original game.'],
   [['METHOD'],
    'We present an algorithm, GameShrink, for abstracting the game using our isomorphism exhaustively.'],
   [['METHOD'],
    'Its complexity is \xef\xbe\x8b\xe5\xbb\xbe(n2 ), where n is the number of nodes in a structure we call the signal tree.'],
   [['METHOD'],
    'It is no larger than the game tree, and on nontrivial games it is drastically smaller, so GameShrink has time and space complexity sublinear in the size of the game tree.'],
   [['RESULT'],
    'Using GameShrink, we find an equilibrium to a poker game with 3.1 billion nodes-over four orders of magnitude more than in the largest poker game solved previously.'],
   [['METHOD'],
    'To address even larger games, we introduce approximation methods that do not preserve equilibrium, but nevertheless yield (ex post) provably close-to-optimal strategies.']],
  [[['OBJECTIVE'],
    'We study coalitional games where the value of cooperation among the agents are solely determined by the attributes the agents possess, with no assumption as to how these attributes jointly determine this value.'],
   [['OBJECTIVE'],
    'This framework allows us to model diverse economic interactions by picking the right attributes.'],
   [['METHOD'],
    'We study the computational complexity of two coalitional solution concepts for these games -- the Shapley value and the core.'],
   [['RESULT'],
    'We show how the positive results obtained in this paper imply comparable results for other games studied in the literature.']],
  [[['BACKGROUND'],
    'Bidders on eBay have no dominant bidding strategy when faced with multiple auctions each offering an item of interest.'],
   [['BACKGROUND'],
    'As seen through an analysis of 1,956 auctions on eBay for a Dell E193FP LCD monitor, some bidders win auctions at prices higher than those of other available auctions, while others never win an auction despite placing bids in losing efforts that are greater than the closing prices of other available auctions.'],
   [['BACKGROUND'],
    'These misqueues in strategic behavior hamper the efficiency of the system, and in so doing limit the revenue potential for sellers.'],
   [['OBJECTIVE'],
    "This paper proposes a novel options-based extension to eBay's proxy-bidding system that resolves this strategic issue for buyers in commoditized markets."],
   [['RESULT'],
    'An empirical analysis of eBay provides a basis for computer simulations that investigate the market effects of the options-based scheme, and demonstrates that the options-based scheme provides greater efficiency than eBay, while also increasing seller revenue.']],
  [[['OBJECTIVE'],
    'We study a natural extension of classical evolutionary game theory to a setting in which pairwise interactions are restricted to the edges of an undirected graph or network.'],
   [['METHOD'],
    'We generalize the definition of an evolutionary stable strategy (ESS), and show a pair of complementary results that exhibit the power of randomization in our setting: subject to degree or edge density conditions, the classical ESS of any game are preserved when the graph is chosen randomly and the mutation set is chosen adversarially, or when the graph is chosen adversarially and the mutation set is chosen randomly.'],
   [['RESULT'],
    'We examine natural strengthenings of our generalized ESS definition, and show that similarly strong results are not possible for them.']],
  [[['BACKGROUND'],
    'Billions of dollars are spent each year on sponsored search, a form of advertising where merchants pay for placement alongside web search results.'],
   [['BACKGROUND'],
    'Slots for ad listings are allocated via an auction-style mechanism where the higher a merchant bids, the more likely his ad is to appear above other ads on the page.'],
   [['OBJECTIVE'],
    'In this paper we analyze the incentive, efficiency, and revenue properties of two slot auction designs: rank by bid (RBB) and rank by revenue (RBR), which correspond to stylized versions of the mechanisms currently used by Yahoo! and Google, respectively.'],
   [['OBJECTIVE'],
    'We also consider first- and second-price payment rules together with each of these allocation rules, as both have been used historically.'],
   [['OBJECTIVE'],
    'We consider both the short-run incomplete information setting and the long-run complete information setting.'],
   [['OBJECTIVE'],
    'With incomplete information, neither RBB nor RBR are truthful with either first or second pricing.'],
   [['RESULT'],
    'We find that the informational requirements of RBB are much weaker than those of RBR, but that RBR is efficient whereas RBB is not.'],
   [['RESULT'],
    'We also show that no revenue ranking of RBB and RBR is possible given an arbitrary distribution over bidder values and relevance.'],
   [['RESULT'],
    'With complete information, we find that no equilibrium exists with first pricing using either RBB or RBR.'],
   [['RESULT'],
    'We show that there typically exists a multitude of equilibria with second pricing, and we bound the divergence of (economic) value in such equilibria from the value obtained assuming all merchants bid truthfully.']],
  [[['OBJECTIVE'],
    'We present an analysis of a person-to-person recommendation network, consisting of 4 million people who made 16 million recommendations on half a million products.'],
   [['METHOD'],
    'We observe the propagation of recommendations and the cascade sizes, which we explain by a simple stochastic model.'],
   [['METHOD'],
    'We then establish how the recommendation network grows over time and how effective it is from the viewpoint of the sender and receiver of the recommendations.'],
   [['METHOD'],
    'While on average recommendations are not very effective at inducing purchases and do not spread very far, we present a model that successfully identifies product and pricing categories for which viral marketing seems to be very effective.']],
  [[['BACKGROUND'],
    'Recommender systems aggregate individual user ratings into predictions of products or services that might interest visitors.'],
   [['BACKGROUND'],
    'The quality of this aggregation process crucially affects the user experience and hence the effectiveness of recommenders in e-commerce.'],
   [['OBJECTIVE', 'METHOD'],
    'We present a novel study that disaggregates global recommender performance metrics into contributions made by each individual rating, allowing us to characterize the many roles played by ratings in nearestneighbor collaborative filtering.'],
   [['METHOD'],
    'In particular, we formulate three roles -- scouts, promoters, and connectors -- that capture how users receive recommendations, how items get recommended, and how ratings of these two types are themselves connected (resp.).'],
   [['METHOD'],
    'These roles find direct uses in improving recommendations for users, in better targeting of items and, most importantly, in helping monitor the health of the system as a whole.'],
   [['METHOD'],
    'For instance, they can be used to track the evolution of neighborhoods, to identify rating subspaces that do not contribute (or contribute negatively) to system performance, to enumerate users who are in danger of leaving, and to assess the susceptibility of the system to attacks such as shilling.'],
   [['RESULT'],
    'We argue that the three rating roles presented here provide broad primitives to manage a recommender system and its community.']],
  [[['OBJECTIVE'],
    'Our proposed methods employ learning and search techniques to estimate outcome features of interest as a function of mechanism parameter settings.'],
   [['METHOD'],
    'We illustrate our approach with a design task from a supply-chain trading competition.'],
   [['METHOD'],
    'Designers adopted several rule changes in order to deter particular procurement behavior, but the measures proved insufficient.'],
   [['RESULT'],
    'Our empirical mechanism analysis models the relation between a key design parameter and outcomes, confirming the observed behavior and indicating that no reasonable parameter settings would have been likely to achieve the desired effect.'],
   [['RESULT'],
    'More generally, we show that under certain conditions, the estimator of optimal mechanism parameter setting based on empirical data is consistent.']],
  [[['OBJECTIVE'],
    'We embark on a systematic analysis of the power and limitations of iterative combinatorial auctions.'],
   [['BACKGROUND'],
    'Most existing iterative combinatorial auctions are based on repeatedly suggesting prices for bundles of items, and querying the bidders for their demand under these prices.'],
   [['METHOD'],
    'We prove a large number of results showing the boundaries of what can be achieved by auctions of this kind.'],
   [['METHOD'],
    'We first focus on auctions that use a polynomial number of demand queries, and then we analyze the power of different kinds of ascending-price auctions.']],
  [[['OBJECTIVE'],
    'In this paper, we examine the relative forecast accuracy of information markets versus expert aggregation.'],
   [['METHOD'],
    "We leverage a unique data source of almost 2000 people's subjective probability judgments on 2003 US National Football League games and compare with the market probabilities given by two different information markets on exactly the same events."],
   [['METHOD'],
    'We combine assessments of multiple experts via linear and logarithmic aggregation functions to form pooled predictions.'],
   [['METHOD'],
    'Prices in information markets are used to derive market predictions.'],
   [['RESULT'],
    'Our results show that, at the same time point ahead of the game, information markets provide as accurate predictions as pooled expert assessments.'],
   [['RESULT'],
    'In screening pooled expert predictions, we find that arithmetic average is a robust and efficient pooling function; weighting expert assessments according to their past performance does not improve accuracy of pooled predictions; and logarithmic aggregation functions offer bolder predictions than linear aggregation functions.'],
   [['RESULT'],
    'The results provide insights into the predictive performance of information markets, and the relative merits of selecting among various opinion pooling methods.']],
  [[['OBJECTIVE'],
    'We determine the communication complexity of the common voting rules.'],
   [['METHOD'],
    'The rules (sorted by their communication complexity from low to high) are plurality, plurality with runoff, single transferable vote (STV), Condorcet, approval, Bucklin, cup, maximin, Borda, Copeland, and ranked pairs.'],
   [['METHOD'],
    'For each rule, we first give a deterministic communication protocol and an upper bound on the number of bits communicated in it; then, we give a lower bound on (even the nondeterministic) communication requirements of the voting rule.'],
   [['RESULT'],
    'The bounds match for all voting rules except STV and maximin.']],
  [[['OBJECTIVE'],
    'We study various computational aspects of solving games using dominance and iterated dominance.'],
   [['OBJECTIVE', 'RESULT'],
    'We first study both strict and weak dominance (not iterated), and show that checking whether a given strategy is dominated by some mixed strategy can be done in polynomial time using a single linear program solve.'],
   [['OBJECTIVE'], 'We then move on to iterated dominance.'],
   [['RESULT'],
    'We show that determining whether there is some path that eliminates a given strategy is NP-complete with iterated weak dominance.'],
   [['RESULT'],
    'This allows us to also show that determining whether there is a path that leads to a unique solution is NP-complete.'],
   [['RESULT'],
    'Both of these results hold both with and without dominance by mixed strategies. (A weaker version of the second result (only without dominance by mixed strategies) was already known [7].)'],
   [['RESULT'],
    'Iterated strict dominance, on the other hand, is path-independent (both with and without dominance by mixed strategies) and can therefore be done in polynomial time.'],
   [['OBJECTIVE'],
    'We then study what happens when the dominating strategy is allowed to place positive probability on only a few pure strategies.'],
   [['RESULT'],
    'First, we show that finding the dominating strategy with minimum support size is NP-complete (both for strict and weak dominance).'],
   [['RESULT'],
    'Then, we show that iterated strict dominance becomes path-dependent when there is a limit on the support size of the dominating strategies, and that deciding whether a given strategy can be eliminated by iterated strict dominance under this restriction is NP-complete (even when the limit on the support size is 3).'],
   [['OBJECTIVE'], 'Finally, we study Bayesian games.'],
   [['RESULT'],
    'We show that, unlike in normal form games, deciding whether a given pure strategy is dominated by another pure strategy in a Bayesian game is NP-complete (both with strict and weak dominance); however, deciding whether a strategy is dominated by some mixed strategy can still be done in polynomial time with a single linear program solve (both with strict and weak dominance).'],
   [['RESULT'],
    'Finally, we show that iterated dominance using pure strategies can require an exponential number of iterations in a Bayesian game (both with strict and weak dominance).']],
  [[['BACKGROUND'],
    'In multi-hop networks, the actions taken by individual intermediate nodes are typically hidden from the communicating endpoints; all the endpoints can observe is whether or not the end-to-end transmission was successful.'],
   [['BACKGROUND'],
    'Therefore, in the absence of incentives to the contrary, rational (i.e., selfish) intermediate nodes may choose to forward packets at a low priority or simply not forward packets at all.'],
   [['OBJECTIVE'],
    'Using a principal-agent model, we show how the hidden-action problem can be overcome through appropriate design of contracts, in both the direct (the endpoints contract with each individual router) and recursive (each router contracts with the next downstream router) cases.'],
   [['OBJECTIVE'],
    'We further demonstrate that per-hop monitoring does not necessarily improve the utility of the principal or the social welfare in the system.'],
   [['OBJECTIVE'],
    'In addition, we generalize existing mechanisms that deal with hidden-information to handle scenarios involving both hidden-information and hidden-action.']],
  [[['OBJECTIVE'],
    'In this paper we formulate the fixed budget resource allocation game to understand the performance of a distributed market-based resource allocation system.'],
   [['OBJECTIVE'],
    'Multiple users decide how to distribute their budget (bids) among multiple machines according to their individual preferences to maximize their individual utility.'],
   [['METHOD'],
    'We look at both the efficiency and the fairness of the allocation at the equilibrium, where fairness is evaluated through the measures of utility uniformity and envy-freeness.'],
   [['RESULT'],
    'We show analytically and through simulations that despite being highly decentralized, such a system converges quickly to an equilibrium and unlike the social optimum that achieves high efficiency but poor fairness, the proposed allocation scheme achieves a nice balance of high degrees of efficiency and fairness at the equilibrium.']],
  [[['OBJECTIVE'],
    'We investigate the class of single-round, sealed-bid auctions for a set of identical items to bidders who each desire one unit.'],
   [['OBJECTIVE'],
    'We adopt the worst-case competitive framework defined by [9, 5] that compares the profit of an auction to that of an optimal single-price sale of least two items.'],
   [['METHOD'],
    'In this paper, we first derive an optimal auction for three items, answering an open question from [8].'],
   [['METHOD'],
    'Second, we show that the form of this auction is independent of the competitive framework used.'],
   [['METHOD'],
    'Third, we propose a schema for converting a given limited-supply auction into an unlimited supply auction.'],
   [['RESULT'],
    'Applying this technique to our optimal auction for three items, we achieve an auction with a competitive ratio of 3.25, which improves upon the previously best-known competitive ratio of 3.39 from [7].'],
   [['METHOD', 'RESULT'],
    'Finally, we generalize a result from [8] and extend our understanding of the nature of the optimal competitive auction by showing that the optimal competitive auction occasionally offers prices that are higher than all bid values.']],
  [[['BACKGROUND'],
    'Bids submitted in auctions are usually treated as enforceable commitments in most bidding and auction theory literature.'],
   [['BACKGROUND'],
    'In reality bidders often withdraw winning bids before the transaction when it is in their best interests to do so.'],
   [['BACKGROUND'],
    'Given a bid withdrawal in a combinatorial auction, finding an alternative repair solution of adequate revenue without causing undue disturbance to the remaining winning bids in the original solution may be difficult or even impossible.'],
   [['BACKGROUND'], "We have called this the Bid-taker's Exposure Problem."],
   [['BACKGROUND'],
    'When faced with such unreliable bidders, it is preferable for the bid-taker to preempt such uncertainty by having a solution that is robust to bid withdrawal and provides a guarantee that possible withdrawals may be repaired easily with a bounded loss in revenue.'],
   [['OBJECTIVE'],
    "In this paper, we propose an approach to addressing the Bidtaker's Exposure Problem."],
   [['METHOD'],
    'Firstly, we use the Weighted Super Solutions framework [13], from the field of constraint programming, to solve the problem of finding a robust solution.'],
   [['METHOD'],
    'A weighted super solution guarantees that any subset of bids likely to be withdrawn can be repaired to form a new solution of at least a given revenue by making limited changes.'],
   [['METHOD'],
    'Secondly, we introduce an auction model that uses a form of leveled commitment contract [26, 27], which we have called mutual bid bonds, to improve solution reparability by facilitating backtracking on winning bids by the bid-taker.'],
   [['METHOD'],
    'We then examine the trade-off between robustness and revenue in different economically motivated auction scenarios for different constraints on the revenue of repair solutions.'],
   [['RESULT'],
    'We also demonstrate experimentally that fewer winning bids partake in robust solutions, thereby reducing any associated overhead in dealing with extra bidders.'],
   [['RESULT'],
    'Robust solutions can also provide a means of selectively discriminating against distrusted bidders in a measured manner.']]])

Evaluation with LSTM

Evalutation with 4 labels


In [115]:
# 4 labels

map_from = [['BACKGROUND'],
            ['OBJECTIVE'],
            ['METHOD'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND'],
            ['OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [94]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,nn_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.695598
             precision    recall  f1-score   support

 BACKGROUND       0.65      0.55      0.60       156
  OBJECTIVE       0.67      0.25      0.36       121
     METHOD       0.53      0.72      0.61       207
     RESULT       0.58      0.72      0.64       118

avg / total       0.60      0.58      0.56       602

Confusion matrix:
[[ 86  10  57   3]
 [ 33  30  44  14]
 [ 11   3 149  44]
 [  2   2  29  85]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.679752
             precision    recall  f1-score   support

 BACKGROUND       0.57      0.57      0.57        21
  OBJECTIVE       0.92      0.25      0.39        44
     METHOD       0.42      0.74      0.53        34
     RESULT       0.64      0.82      0.72        22

avg / total       0.67      0.55      0.52       121

Confusion matrix:
[[12  1  7  1]
 [ 6 11 25  2]
 [ 2  0 25  7]
 [ 1  0  3 18]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.795635
             precision    recall  f1-score   support

 BACKGROUND       0.61      0.50      0.55        28
  OBJECTIVE       0.64      0.47      0.54        15
     METHOD       0.77      0.76      0.77        63
     RESULT       0.57      0.85      0.68        20

avg / total       0.69      0.68      0.68       126

Confusion matrix:
[[14  4  9  1]
 [ 5  7  3  0]
 [ 3  0 48 12]
 [ 1  0  2 17]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.812500
             precision    recall  f1-score   support

 BACKGROUND       0.58      0.67      0.62        21
  OBJECTIVE       0.91      0.45      0.61        22
     METHOD       0.76      0.80      0.78        60
     RESULT       0.70      0.84      0.76        25

avg / total       0.75      0.73      0.72       128

Confusion matrix:
[[14  1  6  0]
 [ 6 10  6  0]
 [ 3  0 48  9]
 [ 1  0  3 21]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.705486
             precision    recall  f1-score   support

 BACKGROUND       0.66      0.53      0.59       152
  OBJECTIVE       0.64      0.29      0.40        92
     METHOD       0.56      0.69      0.62       203
     RESULT       0.57      0.72      0.63       109

avg / total       0.60      0.59      0.58       556

Confusion matrix:
[[ 81  11  56   4]
 [ 26  27  30   9]
 [ 14   2 141  46]
 [  2   2  27  78]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Ranked precision score: 0.682292
             precision    recall  f1-score   support

 BACKGROUND       0.64      0.55      0.59       152
  OBJECTIVE       0.67      0.26      0.38       117
     METHOD       0.57      0.63      0.60       253
     RESULT       0.41      0.71      0.52        86

avg / total       0.58      0.55      0.54       608

Confusion matrix:
[[ 84  10  56   2]
 [ 30  31  45  11]
 [ 14   5 160  74]
 [  3   0  22  61]]

In [134]:
adf = pd.DataFrame(np.array([0.695598,0.679752,0.795635,0.812500,0.705486,0.682292]))
bdf = pd.DataFrame(np.array([0.68,0.64,0.81,0.80,0.68,0.65]))
cdf = pd.DataFrame(np.array([0.47,0.39,0.45,0.41,0.47,0.45]))
ddf = pd.DataFrame(np.array([0.68,0.61,0.75,0.73,0.67,0.66]))
rdf = pd.concat([adf,cdf,bdf,ddf],axis=1)
rdf.columns = ["LSTM-3","SVC-3","LSTM-4","SVC-4"]

In [135]:
rdf.describe()


Out[135]:
LSTM-3 SVC-3 LSTM-4 SVC-4
count 6.000000 6.000000 6.000000 6.000000
mean 0.728544 0.440000 0.710000 0.683333
std 0.059476 0.032863 0.075366 0.050465
min 0.679752 0.390000 0.640000 0.610000
25% 0.685619 0.420000 0.657500 0.662500
50% 0.700542 0.450000 0.680000 0.675000
75% 0.773098 0.465000 0.770000 0.717500
max 0.812500 0.470000 0.810000 0.750000

Evaluation with 3 labels


In [110]:
# 3 labels

map_from = [['BACKGROUND','OBJECTIVE'],
            ['METHOD'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND','OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [111]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,nn_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 68% [407/602]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 64% [78/121]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 81% [102/126]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 80% [103/128]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 68% [379/556]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 65% [397/608]

Evaluation with SVM

Evaluation with 4 labels


In [55]:
# 4 labels

map_from = [['BACKGROUND'],
            ['OBJECTIVE'],
            ['METHOD'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND'],
            ['OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [56]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,svc_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 47% [311/662]
Ranked precision score: 0.598565
             precision    recall  f1-score   support

 BACKGROUND       0.54      0.65      0.59       168
  OBJECTIVE       0.15      0.17      0.16       133
     METHOD       0.52      0.43      0.47       236
     RESULT       0.60      0.58      0.59       125

avg / total       0.47      0.46      0.46       662

Confusion matrix:
[[109  34  23   2]
 [ 76  22  22  13]
 [ 17  83 102  34]
 [  0   5  48  72]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 39% [49/127]
Ranked precision score: 0.529528
             precision    recall  f1-score   support

 BACKGROUND       0.39      0.65      0.49        23
  OBJECTIVE       0.37      0.23      0.28        48
     METHOD       0.33      0.38      0.36        34
     RESULT       0.50      0.45      0.48        22

avg / total       0.39      0.39      0.37       127

Confusion matrix:
[[15  4  2  2]
 [21 11 13  3]
 [ 2 14 13  5]
 [ 0  1 11 10]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 45% [57/126]
Ranked precision score: 0.565476
             precision    recall  f1-score   support

 BACKGROUND       0.47      0.64      0.55        28
  OBJECTIVE       0.00      0.00      0.00        15
     METHOD       0.64      0.40      0.49        63
     RESULT       0.58      0.55      0.56        20

avg / total       0.52      0.43      0.46       126

Confusion matrix:
[[18  5  3  2]
 [13  0  2  0]
 [ 7 25 25  6]
 [ 0  0  9 11]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 41% [53/128]
Ranked precision score: 0.560547
             precision    recall  f1-score   support

 BACKGROUND       0.39      0.71      0.51        21
  OBJECTIVE       0.10      0.14      0.12        22
     METHOD       0.57      0.38      0.46        60
     RESULT       0.60      0.48      0.53        25

avg / total       0.47      0.41      0.42       128

Confusion matrix:
[[15  4  2  0]
 [17  3  2  0]
 [ 6 23 23  8]
 [ 0  0 13 12]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 47% [292/616]
Ranked precision score: 0.605519
             precision    recall  f1-score   support

 BACKGROUND       0.56      0.63      0.59       164
  OBJECTIVE       0.13      0.18      0.15       100
     METHOD       0.54      0.41      0.47       232
     RESULT       0.60      0.57      0.58       120

avg / total       0.49      0.46      0.47       616

Confusion matrix:
[[103  36  22   3]
 [ 56  18  15  11]
 [ 24  80  96  32]
 [  1   7  44  68]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 45% [300/669]
Ranked precision score: 0.580095
             precision    recall  f1-score   support

 BACKGROUND       0.52      0.65      0.58       164
  OBJECTIVE       0.15      0.18      0.16       124
     METHOD       0.56      0.39      0.46       285
     RESULT       0.40      0.52      0.45        96

avg / total       0.45      0.43      0.43       669

Confusion matrix:
[[106  33  23   2]
 [ 68  22  22  12]
 [ 27  87 110  61]
 [  1   4  41  50]]

Evaluation with 3 labels


In [61]:
# 3 labels

map_from = [['BACKGROUND'],
            ['METHOD'],
            ['OBJECTIVE','CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND','OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [62]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,svc_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 62% [408/662]
Ranked precision score: 0.739426
             precision    recall  f1-score   support

  OBJECTIVE       0.92      0.61      0.74       301
     METHOD       0.58      0.35      0.44       236
     RESULT       0.38      0.96      0.54       125

avg / total       0.69      0.59      0.59       662

Confusion matrix:
[[185  56  60]
 [ 17  83 136]
 [  0   5 120]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 60% [76/127]
Ranked precision score: 0.725722
             precision    recall  f1-score   support

  OBJECTIVE       0.95      0.51      0.66        71
     METHOD       0.47      0.41      0.44        34
     RESULT       0.36      0.95      0.52        22

avg / total       0.72      0.56      0.58       127

Confusion matrix:
[[36 15 20]
 [ 2 14 18]
 [ 0  1 21]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 68% [86/126]
Ranked precision score: 0.773810
             precision    recall  f1-score   support

  OBJECTIVE       0.82      0.72      0.77        43
     METHOD       0.83      0.40      0.54        63
     RESULT       0.34      1.00      0.51        20

avg / total       0.75      0.60      0.61       126

Confusion matrix:
[[31  5  7]
 [ 7 25 31]
 [ 0  0 20]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 65% [83/128]
Ranked precision score: 0.757812
             precision    recall  f1-score   support

  OBJECTIVE       0.84      0.74      0.79        43
     METHOD       0.77      0.38      0.51        60
     RESULT       0.42      1.00      0.59        25

avg / total       0.72      0.62      0.62       128

Confusion matrix:
[[32  7  4]
 [ 6 23 31]
 [ 0  0 25]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 59% [363/616]
Ranked precision score: 0.725920
             precision    recall  f1-score   support

  OBJECTIVE       0.86      0.60      0.71       264
     METHOD       0.57      0.34      0.43       232
     RESULT       0.38      0.93      0.55       120

avg / total       0.66      0.57      0.57       616

Confusion matrix:
[[159  54  51]
 [ 24  80 128]
 [  1   7 112]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 55% [366/669]
Ranked precision score: 0.698057
             precision    recall  f1-score   support

  OBJECTIVE       0.86      0.60      0.71       288
     METHOD       0.60      0.31      0.40       285
     RESULT       0.28      0.95      0.44        96

avg / total       0.67      0.53      0.54       669

Confusion matrix:
[[174  55  59]
 [ 27  87 171]
 [  1   4  91]]

Evaluation with Random Forest

Evaluation with 4 labels


In [615]:
rf_pred = RFPredictor(models["clf_rf"],models["vectorizer_rf"],classes_names,nb_index=10,len_graph=20)

In [620]:
# 4 labels

map_from = [['BACKGROUND'],
            ['METHOD'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND'],
            ['OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['BACKGROUND',
             'OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [622]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,rf_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 47% [313/662]
Ranked precision score: 0.602341
             precision    recall  f1-score   support

 BACKGROUND       0.65      0.53      0.58       209
  OBJECTIVE       0.21      0.18      0.19       158
     METHOD       0.38      0.53      0.44       169
     RESULT       0.62      0.62      0.62       126

avg / total       0.47      0.46      0.46       662

Confusion matrix:
[[110  72  26   1]
 [ 37  28  87   6]
 [ 18  22  89  40]
 [  3  11  34  78]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 43% [54/127]
Ranked precision score: 0.559055
             precision    recall  f1-score   support

 BACKGROUND       0.70      0.41      0.52        39
  OBJECTIVE       0.29      0.42      0.35        33
     METHOD       0.35      0.33      0.34        36
     RESULT       0.55      0.63      0.59        19

avg / total       0.47      0.43      0.43       127

Confusion matrix:
[[16 20  3  0]
 [ 3 14 15  1]
 [ 3 12 12  9]
 [ 1  2  4 12]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 48% [61/126]
Ranked precision score: 0.589286
             precision    recall  f1-score   support

 BACKGROUND       0.64      0.46      0.54        39
  OBJECTIVE       0.07      0.03      0.04        31
     METHOD       0.38      0.65      0.48        37
     RESULT       0.60      0.63      0.62        19

avg / total       0.42      0.44      0.41       126

Confusion matrix:
[[18 12  9  0]
 [ 6  1 24  0]
 [ 3  2 24  8]
 [ 1  0  6 12]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 46% [59/128]
Ranked precision score: 0.595703
             precision    recall  f1-score   support

 BACKGROUND       0.76      0.41      0.53        39
  OBJECTIVE       0.27      0.18      0.22        33
     METHOD       0.38      0.62      0.47        37
     RESULT       0.56      0.74      0.64        19

avg / total       0.50      0.46      0.45       128

Confusion matrix:
[[16 15  8  0]
 [ 3  6 24  0]
 [ 2  1 23 11]
 [ 0  0  5 14]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 47% [287/616]
Ranked precision score: 0.596997
             precision    recall  f1-score   support

 BACKGROUND       0.62      0.53      0.57       191
  OBJECTIVE       0.20      0.13      0.16       149
     METHOD       0.37      0.54      0.44       160
     RESULT       0.57      0.59      0.58       116

avg / total       0.44      0.45      0.44       616

Confusion matrix:
[[101  56  32   2]
 [ 41  20  79   9]
 [ 19  15  86  40]
 [  3   9  35  69]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 43% [290/669]
Ranked precision score: 0.566642
             precision    recall  f1-score   support

 BACKGROUND       0.64      0.50      0.56       209
  OBJECTIVE       0.21      0.16      0.18       161
     METHOD       0.32      0.53      0.40       172
     RESULT       0.55      0.42      0.48       127

avg / total       0.44      0.41      0.41       669

Confusion matrix:
[[105  66  37   1]
 [ 40  26  93   2]
 [ 18  23  91  40]
 [  1   9  64  53]]

In [623]:
# 3 labels

map_from = [['BACKGROUND'],
            ['METHOD'],
            ['RESULT','CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND','OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [624]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,rf_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 61% [403/662]
Ranked precision score: 0.734391
             precision    recall  f1-score   support

  OBJECTIVE       0.60      0.87      0.71       209
     METHOD       0.37      0.55      0.44       158
     RESULT       0.94      0.40      0.56       295

avg / total       0.70      0.58      0.58       662

Confusion matrix:
[[182  26   1]
 [ 65  87   6]
 [ 54 123 118]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 61% [77/127]
Ranked precision score: 0.730971
             precision    recall  f1-score   support

  OBJECTIVE       0.51      0.92      0.65        39
     METHOD       0.44      0.45      0.45        33
     RESULT       0.95      0.38      0.55        55

avg / total       0.68      0.57      0.55       127

Confusion matrix:
[[36  3  0]
 [17 15  1]
 [18 16 21]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 67% [84/126]
Ranked precision score: 0.763228
             precision    recall  f1-score   support

  OBJECTIVE       0.70      0.77      0.73        39
     METHOD       0.38      0.77      0.51        31
     RESULT       1.00      0.36      0.53        56

avg / total       0.75      0.59      0.59       126

Confusion matrix:
[[30  9  0]
 [ 7 24  0]
 [ 6 30 20]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 65% [83/128]
Ranked precision score: 0.757812
             precision    recall  f1-score   support

  OBJECTIVE       0.72      0.79      0.76        39
     METHOD       0.40      0.73      0.52        33
     RESULT       1.00      0.45      0.62        56

avg / total       0.76      0.62      0.63       128

Confusion matrix:
[[31  8  0]
 [ 9 24  0]
 [ 3 28 25]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 58% [356/616]
Ranked precision score: 0.719156
             precision    recall  f1-score   support

  OBJECTIVE       0.59      0.82      0.69       191
     METHOD       0.34      0.53      0.41       149
     RESULT       0.91      0.39      0.55       276

avg / total       0.67      0.56      0.56       616

Confusion matrix:
[[157  32   2]
 [ 61  79   9]
 [ 46 121 109]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 56% [373/669]
Ranked precision score: 0.703538
             precision    recall  f1-score   support

  OBJECTIVE       0.59      0.82      0.69       209
     METHOD       0.33      0.58      0.42       161
     RESULT       0.97      0.31      0.47       299

avg / total       0.70      0.53      0.53       669

Confusion matrix:
[[171  37   1]
 [ 66  93   2]
 [ 51 155  93]]

In [625]:
# 3 labels

map_from = [['BACKGROUND'],
            ['METHOD','RESULT'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_prediction = [map_from,map_to]

map_from = [['BACKGROUND','OBJECTIVE'],
            ['RESULT'],
            ['CONCLUSION']]
map_to   =  ['OBJECTIVE',
             'METHOD',
             'RESULT']
mapping_true = [map_from,map_to]

In [626]:
path = './annotations/csv/'
onlyfiles = [ f for f in listdir(path) if isfile(join(path,f)) ]
for i in onlyfiles:
    if not i.startswith('.') and not i.startswith('_') and i.endswith('.csv'):
        way = os.path.join(path, i)
        print('_'*80)
        print(('  %s  '%(i[:-4])).rjust(41+len(i[:-4])/2,'-').ljust(80,'-'))
        print('‾'*80)
        print()
        evaluate_on_annotated(way,rf_pred,mapping_prediction,mapping_true)


________________________________________________________________________________
---------------------------  abst_check_v4_aizawa  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 68% [447/662]
Ranked precision score: 0.775680
             precision    recall  f1-score   support

  OBJECTIVE       0.60      0.87      0.71       209
     METHOD       0.75      0.54      0.63       327
     RESULT       0.62      0.62      0.62       126

avg / total       0.68      0.66      0.65       662

Confusion matrix:
[[182  26   1]
 [105 176  46]
 [ 14  34  78]]
________________________________________________________________________________
------------------------  abst_check_v6_Christopher  ---------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 63% [80/127]
Ranked precision score: 0.746719
             precision    recall  f1-score   support

  OBJECTIVE       0.51      0.92      0.65        39
     METHOD       0.79      0.39      0.52        69
     RESULT       0.55      0.63      0.59        19

avg / total       0.67      0.59      0.57       127

Confusion matrix:
[[36  3  0]
 [32 27 10]
 [ 3  4 12]]
________________________________________________________________________________
---------------------------  abst_check_v6_Goran  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 75% [95/126]
Ranked precision score: 0.821429
             precision    recall  f1-score   support

  OBJECTIVE       0.70      0.77      0.73        39
     METHOD       0.76      0.71      0.73        68
     RESULT       0.60      0.63      0.62        19

avg / total       0.72      0.71      0.71       126

Confusion matrix:
[[30  9  0]
 [12 48  8]
 [ 1  6 12]]
________________________________________________________________________________
----------------------------  abst_check_v6_Yoko  ------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 74% [95/128]
Ranked precision score: 0.820312
             precision    recall  f1-score   support

  OBJECTIVE       0.72      0.79      0.76        39
     METHOD       0.78      0.67      0.72        70
     RESULT       0.56      0.74      0.64        19

avg / total       0.73      0.72      0.72       128

Confusion matrix:
[[31  8  0]
 [12 47 11]
 [ 0  5 14]]
________________________________________________________________________________
--------------------------  hattori_abst_check_v3  -----------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 66% [406/616]
Ranked precision score: 0.767587
             precision    recall  f1-score   support

  OBJECTIVE       0.59      0.82      0.69       191
     METHOD       0.71      0.53      0.61       309
     RESULT       0.57      0.59      0.58       116

avg / total       0.65      0.63      0.63       616

Confusion matrix:
[[157  32   2]
 [ 95 165  49]
 [ 12  35  69]]
________________________________________________________________________________
-----------------------------------  test  -------------------------------------
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

Accuracy : 64% [430/669]
Ranked precision score: 0.754360
             precision    recall  f1-score   support

  OBJECTIVE       0.59      0.82      0.69       209
     METHOD       0.65      0.55      0.60       333
     RESULT       0.55      0.42      0.48       127

avg / total       0.61      0.61      0.60       669

Confusion matrix:
[[171  37   1]
 [107 184  42]
 [ 10  64  53]]

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: