コード例 #1
0
ファイル: __init__.py プロジェクト: gsanou/ontogram
 def url(self):
     """Get the URL of the ontology from www.plantuml.com."""
     p = PlantUML(url='http://www.plantuml.com/plantuml/img/')
     return p.get_url(self.plantuml)
コード例 #2
0
        verb = words[1][0][0]
        connection_label += verb

        noun = words[2][0][0]
        relation = (actor_name, noun)

        if relation not in added_relations:
            added_relations[relation] = set()

        added_relations[relation].add("<&caret-right> " + connection_label)

    for relation, label in added_relations.items():
        # print(label)
        plantuml += ":" + relation[0] + ": --> (" + relation[
            1] + ") : " + "\\l".join(list(label)) + "\n"

    plantuml += "@enduml\n"

    print(planty.get_url(plantuml))

    with open('./facebook.plantuml', 'w') as planty_output:
        planty_output.write(plantuml)
        print("plantuml output saved")

    # rejoin the sentences using my rejoiner function
    sentences = map(lambda s: rejoin(s), sentences_tokenized)

    # generate an HTML report
    generate_report(sentences)