Returns a string id, for example: "NPIJYaS-1", "NPIJYaS-2", ... The string part is based on the current time, the number suffix is auto-incremental.
()
| 299 | _UID = 0 |
| 300 | _SESSION = shi(int(time() * 1000)) # Avoid collision with pickled documents. |
| 301 | def _uid(): |
| 302 | """ Returns a string id, for example: "NPIJYaS-1", "NPIJYaS-2", ... |
| 303 | The string part is based on the current time, the number suffix is auto-incremental. |
| 304 | """ |
| 305 | global _UID; _UID+=1; return _SESSION+"-"+str(_UID) |
| 306 | |
| 307 | # Term relevance weight: |
| 308 | TF, TFIDF, TF_IDF, BINARY = \ |