• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum
FORUM

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] Splitting a text paragraph into sentences

    How To... ?
    3
    7
    960
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      ActHappy last edited by Woland

      Hey,

      I'm trying to build a surtitle/teleprompter system for a show atm and want to use a data array actor reading an excel spreadsheet with the script in it. The two systems should be linked so that the surtitle system breaks down a paragraph into X lines (depending on length), that are individually cued, while the teleprompter system only updates when the surtitles system finished the whole paragraph.

      I was gonna use a text chopper actor to split up the lines from the paragraph but I just ran into the issue that the tab separated values sheet converts line breaks into double spaces or something that the text chopper actor doesn't recognize.

      Is there a way for an actor to receive a paragraph of several sentences, recognize a character (say a dot "."), and split up the paragraph into the individual sentences?

      Thanks for your help in advance.

      mark_m DusX 2 Replies Last reply Reply Quote 0
      • mark_m
        mark_m @ActHappy last edited by

        @acthappy

        Perhaps the solution is not in how you deal with the data in Isadora, but how you present the data to Isadora?

        Perhaps using a text editor like Notepad++ you can edit the tab separated values file to replace the line breaks with something the text chopper actor does recognise?

        Perhaps the text formatter actor is your friend here?

        [I've been doing a similar thing myself, creating captions for a show, but the director very clear on how he wanted things formatted, and how many lines grouped together, etc. So I put each line of text in a column of a spreadsheet so that the data array actor saw each line as a separate string. I then used the text formatter actor to put each string on a separate line in the text draw actor.

        The director also wanted all the captions to be centered on screen, so I used excel to count the number of 'lines' in each caption, and brought that data as a value into the data array, and that value was linked to the input of a selector actor giving on offset value to the vertical position in the text draw actor ensuring each caption was centred no matter it it had one, two, three of four lines

        When I've got this show up and running I'll share a fully commented version of the patch here, but that won't be for a few days yet]


        Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
        Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
        PC Specialist Desktop: i9-14900K, RTX4070Ti, 64GB RAM, Win11Pro
        www.natalieinsideout.com

        1 Reply Last reply Reply Quote 1
        • DusX
          DusX Tech Staff @ActHappy last edited by

          @acthappy

          In case you are not aware, Isadora has a SRT player available in the Addons.

          I have found working in http://www.aegisub.org/ and using the SRT actor to work rather well.

          Troikatronix Technical Support

          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
          • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

          Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 1
          • A
            ActHappy last edited by

            @mark_m 

            Thank you for the advice! I did end up solving the issue by separating the lines in google sheets using an expression i found and bringing them in as individual colums, I assume like you have done before, and it's working great!

            I do have a follow-up question. There are some reoccurring stage directions that describe the sounds playing from the sound design (for deaf audience members), and each of them triggers a corresponding animation. What I'm trying to achieve is to recognize these stage directions (they look like this: "[Sound: Comedic SPLASH]") and replace those words with "Splash" as well as send a 1-10 value to activate the relevant animation in a little movie player system. I thought that the cleanest way was to use the javascript actor, but i think that my entry level JS knowledge has gotten a little rusty. Is there a glaring mistake I'm making based on the picture attached?

            screen-shot-2023-01-27-at-3.38.02-pm.png

            @DusX 

            That's very good to know I have a project coming up where I will certainly use this! For this project I unfortunately can't rely on it being timecoded and need individual triggers.

            DusX mark_m 2 Replies Last reply Reply Quote 0
            • DusX
              DusX Tech Staff @ActHappy last edited by

              @acthappy

              You will need to reference the incoming values by the arguments list. The names you give for the inputs and outputs in the comments do not effect the code names.

              So 'iz_input 1' needs to be referenced as arguments[0]

              The test you are performing is using the single = sign, which is used for assignment.. to test if it is equal you need == or === (3 is more strict)

              However, in this case, you might benefit from a javascript string function to test if a sub-string is contained in the string. see: https://www.w3schools.com/jsre...

              Troikatronix Technical Support

              • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
              • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
              • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

              Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

              A 1 Reply Last reply Reply Quote 1
              • mark_m
                mark_m @ActHappy last edited by

                @acthappy


                funnily enough I am just sitting in an audience to watch a show made by and designed for hearing impaired audiences, waiting for it to atart

                The solution to your problem is to add an extra column to your spreadsheet, and put in a value each time you want the animation to show. This value goes into the date array and can use a selector or comparator actor linked to a trigger to fire the animation. Does that make sense?! Curtains  up, gotta go!

                Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
                Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
                PC Specialist Desktop: i9-14900K, RTX4070Ti, 64GB RAM, Win11Pro
                www.natalieinsideout.com

                1 Reply Last reply Reply Quote 1
                • A
                  ActHappy @DusX last edited by

                  @dusx

                  aah yes that worked well! Thank you for the help!

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post