sort first and then compact
"cell_type": "markdown",
"metadata": {},
"source": [
- "### Step 11: add ids"
+ "### Step 11: sort and compact "
]
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
- "!kgtk add-id -i $temp/all_labels_aliases_descriptions_duplicates.tsv \\\n",
- " -o $temp/all_labels_aliases_descriptions_duplicates_ids.tsv \\\n",
- " --id-style node1-label-num"
+ "!kgtk sort2 -i $temp/all_labels_aliases_descriptions_duplicates.tsv \\\n",
+ " -o $temp/all_labels_aliases_descriptions_sorted.tsv\n",
+ "\n",
+ "!kgtk compact -i $temp/all_labels_aliases_descriptions_sorted.tsv \\\n",
+ " -o $temp/all_labels_aliases_descriptions_sorted_dedup.tsv"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "### Step 12: deduplicate and output"
+ "### Step 12: add ids"
]
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
- "!kgtk compact -i $temp/all_labels_aliases_descriptions_duplicates_ids.tsv \\\n",
+ "!kgtk add-id -i $temp/all_labels_aliases_descriptions_sorted_dedup.tsv \\\n",
" -o $OUT/$OUT_FILE \\\n",
- " --lists-in-input False"
+ " --id-style node1-label-num"
]
},
{
