用java解码.pb文件,有没有写一个小程序?

用java解码.pb文件,有没有写一个小程序?,java,protocol-buffers,decode,Java,Protocol Buffers,Decode,我有一份档案 我有一个.pb文件,如下所示: Ü &/guid/9202a8c04000641f8000000003221072&/guid/9202a8c04000641f80000000004cfd50NA"Ö S/m/vinci8/data1/riedel/projects/relation/kb/nyt1/docstore/2007-joint/1850511.xml.pb„€€€øÿÿÿÿƒ€€€øÿÿÿÿ"PERSON->PERSON"'inverse_f

我有一份档案

我有一个.pb文件,如下所示:

Ü
&/guid/9202a8c04000641f8000000003221072&/guid/9202a8c04000641f80000000004cfd50NA"Ö

S/m/vinci8/data1/riedel/projects/relation/kb/nyt1/docstore/2007-joint/1850511.xml.pb„€€€øÿÿÿÿƒ€€€øÿÿÿÿ"PERSON->PERSON"'inverse_false|PERSON|on bass and|PERSON"/inverse_false|with|PERSON|on bass and|PERSON|on"7inverse_false|, with|PERSON|on bass and|PERSON|on drums"$inverse_false|PERSON|IN NN CC|PERSON",inverse_false|with|PERSON|IN NN CC|PERSON|on"4inverse_false|, with|PERSON|IN NN CC|PERSON|on drums"`str:Dave[NMOD]->|PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON|[NMOD]->Barry"]str:Dave[NMOD]->|PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON|[NMOD]->on"Rstr:Dave[NMOD]->|PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON"Adep:[NMOD]->|PERSON|[PMOD]->[ADV]->[ROOT]<-[PRD]<-[PMOD]<-|PERSON"dir:->|PERSON|->-><-<-<-|PERSON"Sstr:PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON|[NMOD]->Barry"Adep:PERSON|[PMOD]->[ADV]->[ROOT]<-[PRD]<-[PMOD]<-|PERSON|[NMOD]->"dir:PERSON|->-><-<-<-|PERSON|->"Pstr:PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON|[NMOD]->on"Adep:PERSON|[PMOD]->[ADV]->[ROOT]<-[PRD]<-[PMOD]<-|PERSON|[NMOD]->"dir:PERSON|->-><-<-<-|PERSON|->"Estr:PERSON|[PMOD]->with[ADV]->was[ROOT]<-on[PRD]<-bass[PMOD]<-|PERSON*ŒThe occasion was suitably exceptional : a reunion of the 1970s-era Sam Rivers Trio , with Dave Holland on bass and Barry Altschul on drums ."¬
        <Doc>
            <DocNo>1~1</DocNo>
            <FileName>/m/vinci8/data1/riedel/projects/relation/kb/nyt1/docstore/2007-joint/1849689.xml.pb</FileName>
            <Sentence>Tonight he brings his energies and expertise to the Miller Theater for the festival 's thrilling finale : a reunion of the 1970s Sam Rivers Trio , with Dave Holland on bass and Barry Altschul on drums .</Sentence>
            <SourceNE>PERSON</SourceNE>
            <DestNE>PERSON</DestNE>
            <SourceId>-2147483642</SourceId>
            <DestId>-2147483643</DestId>
            <Features>
            <![CDATA[
                <Feature>PERSON->PERSON</Feature>
                <Feature>inverse_false|PERSON|on bass and|PERSON</Feature>
                <Feature>inverse_false|with|PERSON|on bass and|PERSON|on</Feature>
                <Feature>inverse_false|, with|PERSON|on bass and|PERSON|on drums</Feature>
                <Feature>inverse_false|PERSON|IN NN CC|PERSON</Feature>
                <Feature>inverse_false|with|PERSON|IN NN CC|PERSON|on</Feature>
                <Feature>inverse_false|, with|PERSON|IN NN CC|PERSON|on drums</Feature>
                <Feature>str:Dave[NMOD]->|PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON|[NMOD]->Barry</Feature>
                <Feature>str:Dave[NMOD]->|PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON|[NMOD]->on</Feature>
                <Feature>str:Dave[NMOD]->|PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON</Feature>
                <Feature>dep:[NMOD]->|PERSON|[PMOD]->[NMOD]->[NULL]<-[NMOD]<-[PMOD]<-|PERSON</Feature>
                <Feature>dir:->|PERSON|->-><-<-<-|PERSON</Feature>
                <Feature>str:PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON|[NMOD]->Barry</Feature>
                <Feature>dep:PERSON|[PMOD]->[NMOD]->[NULL]<-[NMOD]<-[PMOD]<-|PERSON|[NMOD]-></Feature>
                <Feature>dir:PERSON|->-><-<-<-|PERSON|-></Feature>
                <Feature>str:PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON|[NMOD]->on</Feature>
                <Feature>dep:PERSON|[PMOD]->[NMOD]->[NULL]<-[NMOD]<-[PMOD]<-|PERSON|[NMOD]-></Feature>
                <Feature>dir:PERSON|->-><-<-<-|PERSON|-></Feature>
                <Feature>str:PERSON|[PMOD]->with[NMOD]->Trio[NULL]<-on[NMOD]<-bass[PMOD]<-|PERSON</Feature>
            ]]>
            </Features>
        </Doc>
    </Docs>
Ü
&/guid/9202A8C04000641F80000003221072和/guid/9202A8C04000641F80000004CFD50NA“Ö
1/m/ViVinci8/m/ViViViViVici8/数据1/5/数据1/数据1/瑞代尔/里德尔/里德尔/项目/关系/关系/关系/关系/知识/知识/知识/知识/知识/数据/数据/数据1////////1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/4/4/4/4/5/5/5/4/5/5/5/5/4/5/5/5/5/5/5/5/5/4/5/5/5/5/5/4/5/5/4/5/5/5/4/5/5/5/5/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/1/5/NN CC中的|个人|个人“,在NN CC | PERSON |上用| PERSON |在NN CC | PERSON |在“4reverse | false |上用| PERSON |在NN CC | PERSON |在鼓上用”`str:Dave[NMOD]>| PERSON |[PMOD]>在[ADV]->是[ROOT]|[PMOD]>在[ADV]->是[ROOT]>

如果您有兴趣真诚地帮助我,请尝试用文字进行解释,而不是像他们在中所做的那样仅仅发布文档链接。

您在哪里遇到问题?首先,需要为protocoll缓冲区创建接口类。然后,您需要创建一个Java应用程序,该应用程序对
*.pb
进行解码并返回一个对象树。通过该对象树,您可以构建类似XML的结构