hwwang55/KGCN

Creation of kg.txt

Opened this issue · 12 comments

Hello Wang,
How do we create the knowledge graph file (kg.txt) if we are to train this network on a movieLens 100k dataset?

Hi! I think you can first have a check that if every movie in MovieLens-100k shows up in the kg.txt file. You may delete movies that are not contained in kg.txt from MovieLens-100k for simplicity. Otherwise, you may resort to other open source knowledge graphs to extract triplets for these missing movies.

Hi,
Thanks for the quick response. Do you mind suggesting some open source reference to create the KG.

Do you know how to create kg.txt?Can you share it with me?

rituk commented

@hwwang55 can you provide steps on how to create a kg file for a new dataset instead of movie or music data? I tried but keep getting errors.

Hi there, what type of datasets are you working on?

rituk commented

It's a dataset similar to movie dataset with user, article, rating, timestamp format. I am creating the kg to use for another algo test. They published the paper using the output of your data it seems.

you need to find a KG that matches the items in your dataset, and then do the linking between entities and items.

rituk commented

What if I want to create a kg myself? Does your code expect to have each item exist in the kg.txt?

Do you have the information to construct a KG for items? KG contains factual knowledge so it cannot be "created" but only "extracted" from available source of information. For example, you have the attributes of items, and these attributes can be connected to each other. Or, you have some natural texts describing these items, so you can use information extraction (IE) tools to extract a KG for these items.

rituk commented

Yes, I do have info like article, specialty, lead-concept etc.

You need to extract information from articles, and see if the specialty and lead concept information you mentioned can form a graph. How to construct a KG is beyond the scope of this work, especially when you want to construct a KG from text. This is more on the NLP side.

rituk commented

Thank you, your tips helped me solve the issue. I am implementing CG-KGR algo with custom data.