ikuinen / CMIN_moment_retrieval

Cross-Modal Interaction Networks for Query-Based Moment Retrieval in Videos
86 stars 20 forks source link

about the train_data_gcn.json #9

Closed xixiareone closed 4 years ago

xixiareone commented 4 years ago

Hi! How to prepare train_data gcn.json, can you share the code for preparing train _data gcn.json?

ikuinen commented 4 years ago

@xixiareone You can use the nltk to build the semantic dependencies. Note that you should start the StanfordCoreNLP server at port 9000. (refer to here)

from nltk.parse.corenlp import CoreNLPDependencyParser
dep_parser = CoreNLPDependencyParser(url='http://localhost:9000')
parse, = dep_parser.raw_parse(sentence)
xixiareone commented 4 years ago

hi,thank you very much!

------------------ 原始邮件 ------------------ 发件人: "LinZhijie"<notifications@github.com>; 发送时间: 2020年4月9日(星期四) 下午5:35 收件人: "ikuinen/CMIN_moment_retrieval"<CMIN_moment_retrieval@noreply.github.com>; 抄送: "Gin"<xixiareone@foxmail.com>; "Mention"<mention@noreply.github.com>; 主题: Re: [ikuinen/CMIN_moment_retrieval] about the train_data_gcn.json (#9)

@xixiareone您可以使用nltk构建语义依赖关系。请注意,您应该在端口9000上启动StanfordCoreNLP服务器。(请参阅此处) from nltk.parse.corenlp import CoreNLPDependencyParser dep_parser = CoreNLPDependencyParser(url='http://localhost:9000') parse, = dep_parser.raw_parse(sentence)