refactor shared from SemanticNet