Assigning semantic types to entity and link types