public void unassignUserType(SemanticType semanticType) { if (semanticType == null) { if (userSemanticTypes == null || userSemanticTypes.isEmpty()) this.semanticTypeStatus = ColumnSemanticTypeStatus.Unassigned; return; } int tobeDeletedIndex = -1; if (userSemanticTypes != null) { SemanticType st; for (int i = 0; i < userSemanticTypes.size(); i++) { st = userSemanticTypes.get(i); if (st.getModelLabelString().equalsIgnoreCase(semanticType.getModelLabelString())) { tobeDeletedIndex = i; break; } } } if (tobeDeletedIndex != -1 && userSemanticTypes != null) { userSemanticTypes.remove(tobeDeletedIndex); } if (userSemanticTypes == null || userSemanticTypes.isEmpty()) this.semanticTypeStatus = ColumnSemanticTypeStatus.Unassigned; }
if (userSemanticTypes != null) { for (SemanticType t : userSemanticTypes) { if (st.getModelLabelString().equalsIgnoreCase(t.getModelLabelString())) { if (i == 0) numberOfAttributesWhoseTypeIsFirstCRFType ++; numberOfAttributesWhoseTypeIsInCRFTypes ++;
ISemanticTypeModelHandler modelHandler = workspace.getSemanticTypeModelHandler(); for(SemanticType newType : newTypes) { String label = newType.getModelLabelString(); modelHandler.addType(label, examples);
for (SemanticType semanticType: candidateSemanticTypes) { logger.info("\t===== Semantic Type: " + semanticType.getModelLabelString());
for (SemanticType semanticType: candidateSemanticTypes) { logger.info("\t" + semanticType.getConfidenceScore() + " :" + semanticType.getModelLabelString());
if (userSemanticTypes != null) { for (SemanticType st : userSemanticTypes) { if (st.getModelLabelString().equalsIgnoreCase(newType.getModelLabelString())) { duplicateSemanticType = true; break;
if (userSemanticTypes != null) { for (SemanticType st : userSemanticTypes) { if (st.getModelLabelString().equalsIgnoreCase(type.getModelLabelString())) { duplicateSemanticType = true; break;
if (userSemanticTypes != null) { for (SemanticType st : userSemanticTypes) { if (st.getModelLabelString().equalsIgnoreCase(newType.getModelLabelString())) { duplicateSemanticType = true; break;