fc94e852a9c55b50d0d2b25cfc74a6916b7be09e,estnltk/database/database.py,Database,insert,#Database#Any#Any#,55
Before Change
def insert(self, id, text):
con = prepare_text(text)
//print(con)
self.es.index(index=self.__index_name, doc_type=self.doc_type, id=id, body=con)
def update(self, text, id=None):
pass
After Change
"body": prepared_text
}
if id is not None:
kwargs["id"] = int(id)
doc_id = self.es.create(**kwargs)["_id"]
self.refresh()
return doc_id
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: estnltk/estnltk
Commit Name: fc94e852a9c55b50d0d2b25cfc74a6916b7be09e
Time: 2015-08-18
Author: tpetmanson@gmail.com
File Name: estnltk/database/database.py
Class Name: Database
Method Name: insert
Project Name: pytorch/fairseq
Commit Name: 621e834103b13318cb48d41fc713b580f0da6b24
Time: 2020-08-04
Author: alexei.b@gmail.com
File Name: examples/speech_recognition/w2l_decoder.py
Class Name: W2lKenLMDecoder
Method Name: __init__
Project Name: CellProfiler/CellProfiler
Commit Name: 0469b770bd9846510c5b4872424443d72d5baa73
Time: 2009-12-18
Author: thouis@1fc53939-2000-0410-845c-e8453a809027
File Name: pyCellProfiler/cellprofiler/modules/measureobjectintensity.py
Class Name: MeasureObjectIntensity
Method Name: prepare_settings