GithubHelp home page GithubHelp logo

Comments (5)

luigi-asprino avatar luigi-asprino commented on June 27, 2024 1

A remodelling of the Facade-X interpretation of PPTx was needed to extract hyperlinks. In the previous implementation, slides contained shapes as slots, where each shape had a single slot containing the text of the shape. This avoids "attaching" annotations (e.g. hyperlinks) to individual pieces of text (as the text is a single mass).
Therefore, a bit more structure was needed to extract the hyperlinks.
Here is the structure extracted from this file

[ rdf:type  fx:root , xyz:Presentation ;
  rdf:_1    [ rdf:type  xyz:Slide ;
              rdf:_1    [ rdf:type  xyz:CENTERED_TITLE ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "This is a test presentation"
                                                            ]
                                                ]
                                    ]
                        ] ;
              rdf:_2    [ rdf:type  xyz:SUBTITLE ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "This is the subtitle"
                                                            ]
                                                ]
                                    ]
                        ]
            ] ;
  rdf:_2    [ rdf:type  xyz:Slide ;
              rdf:_1    [ rdf:type  xyz:TITLE ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "First slide"
                                                            ]
                                                ]
                                    ]
                        ] ;
              rdf:_2    [ rdf:type  xyz:CONTENT ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "Link"
                                                            ] ;
                                                  rdf:_2    [ rdf:type  xyz:Hyperlink ;
                                                              rdf:_1    "https://sparql-anything.cc/"
                                                            ]
                                                ]
                                    ] ;
                          rdf:_2    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "Bullet 2"
                                                            ]
                                                ]
                                    ]
                        ]
            ] ;
  rdf:_3    [ rdf:type  xyz:Slide ;
              rdf:_1    [ rdf:type  xyz:TITLE ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "Second "
                                                            ]
                                                ] ;
                                      rdf:_2    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "slide"
                                                            ]
                                                ]
                                    ]
                        ] ;
              rdf:_2    [ rdf:type  xyz:CONTENT ;
                          rdf:_1    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "Bullet 1"
                                                            ]
                                                ]
                                    ] ;
                          rdf:_2    [ rdf:type  xyz:Paragraph ;
                                      rdf:_1    [ rdf:type  xyz:TextRun ;
                                                  rdf:_1    [ rdf:type  xyz:Text ;
                                                              rdf:_1    "Bullet 2"
                                                            ]
                                                ]
                                    ]
                        ]
            ]
] .

There is a deep nesting, I agree, but I don't see any other solution.

from sparql.anything.

luigi-asprino avatar luigi-asprino commented on June 27, 2024 1

@kvistgaard v1.0-DEV.1 has been released, so you can test the new features related to the #429

https://github.com/SPARQL-Anything/sparql.anything/releases/tag/v1.0-DEV.1

from sparql.anything.

enridaga avatar enridaga commented on June 27, 2024

Can you also include a link to the source pptx?

from sparql.anything.

luigi-asprino avatar luigi-asprino commented on June 27, 2024

https://github.com/SPARQL-Anything/sparql.anything/raw/v1.0-DEV/sparql-anything-slides/src/test/resources/Presentation3.pptx

from sparql.anything.

kvistgaard avatar kvistgaard commented on June 27, 2024

@luigi-asprino, when is a 1.0.0-RC planned? I guess that will be the first opportunity to test PPTX hyperlinks.

from sparql.anything.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.