KDD-OpenSource / 32de-python

Server component of graph exploration tool with meta-paths

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escaping of spaces in node/edge names

Baschdl opened this issue · comments

Implement escaping or removing of spaces in node and edge names in to_str function.

is this only about spaces?
e.g. "writes book" sould be "writes_book" or "writesbook"?

in any case, just use "writes book".replace(" ",replacement) where replacement could be an emty string or underscore

is this only about spaces?

The reason is that the edge and node types should be recognized as "words" by the tf-idf-Vectorizer from sklearn.

In cypher you can use backticks around node-labels and property-key and rel-types.

In the java/kernel API you just use Java Strings.

apparently you can override the word tokenizer with your own callable, so maybe use
tokenizer=lambda sequence: sequence.split(';') and we can just pass the metapath with ';' as a delimter