Failure to import FLExTexts from ELAN

355 views
Skip to first unread message

Jesse Wichers Schreur

unread,
Jul 4, 2019, 11:32:08 AM7/4/19
to FLEx list
Hi all,

Since FLEx 9, I've been unable to import .flextext files that were created in ELAN. I have tried to import both files that were created earlier and which I was definitely able to import into FLEx 8, as well as newly created files.
In both instances, I get the message: "Interlinear Import failed. Are you sure you are importing a file in FLExText interlinear format? Word, Open Office, and Libre Office docs cannot yet be imported."

Does anyone have the same issue, or am I doing something wrong? I'm sure the .flextext files were created properly.

Cheers,
Jesse

Stevan Vanderwerf

unread,
Jul 11, 2019, 8:36:13 AM7/11/19
to flex...@googlegroups.com
Hi Jesse,

Can you send me the flextext file that works in FW8 but not FW9 and I'll investigate it? The most likely problem occurs when the language codes don't match up between ELAN and FLEx, but it seems that is not the case here. 

You can upload the file here: https://www.dropbox.com/request/gKSFHyiu2dS8bQOHrmfI without any dropbox account needed. 

Stevan
LSDev FLEx

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/9a2f163e-3f90-4ee8-82dd-aff5925e515b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jesse Wichers Schreur

unread,
Jan 22, 2020, 12:03:37 PM1/22/20
to FLEx list
Hi Stevan,

It's been a long time since the OP, so I sort of forgot where we were. I have (re-)sent the file in question. Apologies for the confusion and tardiness.

I've been trying to export from ELAN to sfm instead, but I can't seem to work out how to include multiple speakers into one toolbox-file. Would you happen to know how to do this? I only get the transcription line from the top speaker...

Thanks a lot, bedankt!
-Jesse

On Thursday, July 11, 2019 at 2:36:13 PM UTC+2, Stevan V wrote:
Hi Jesse,

Can you send me the flextext file that works in FW8 but not FW9 and I'll investigate it? The most likely problem occurs when the language codes don't match up between ELAN and FLEx, but it seems that is not the case here. 

You can upload the file here: https://www.dropbox.com/request/gKSFHyiu2dS8bQOHrmfI without any dropbox account needed. 

Stevan
LSDev FLEx

On Thu, Jul 4, 2019 at 6:32 PM Jesse Wichers Schreur <jesse....@gmail.com> wrote:
Hi all,

Since FLEx 9, I've been unable to import .flextext files that were created in ELAN. I have tried to import both files that were created earlier and which I was definitely able to import into FLEx 8, as well as newly created files.
In both instances, I get the message: "Interlinear Import failed. Are you sure you are importing a file in FLExText interlinear format? Word, Open Office, and Libre Office docs cannot yet be imported."

Does anyone have the same issue, or am I doing something wrong? I'm sure the .flextext files were created properly.

Cheers,
Jesse

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex...@googlegroups.com.

To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/9a2f163e-3f90-4ee8-82dd-aff5925e515b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris W.

unread,
Jan 22, 2020, 4:19:06 PM1/22/20
to FLEx list
Hi Jesse,

I hadn't noticed your original message... but I ran into this issue in late October.  I had a couple different issues, however, so I am wondering if you can explain your entire workflow?

Are you starting with a text in FLEx and then exporting it to ELAN?  Or, are you starting in ELAN, exporting to FLEx, then exporting back to ELAN?  Or something else?

For me, I actually had two separate issues.  Unfortunately, I don't recall which was was giving the error that you posted in your OP.  My first issue was a corruption of one of the Interlinear texts (although, I'm not sure how it occurred).  My second issue was attempting to use one of the ELAN-FLEx-ELAN workflows that I found online - namely John Mansfield's.  We've collaborated briefly and created a fixed version of the XSL merge process (which merges the XML from the original ELAN .flextext and the interlinearized FLEx .flextext).  The issue was that some of the FLEx updates seem to have changed the structure of the .flextext files (slightly, but enough to create issues with ELAN).

If any of this sounds similar to your issue, let me know!  I can include more details about either issue.

Best,
Chris

Jesse Wichers Schreur

unread,
Jan 23, 2020, 5:53:18 AM1/23/20
to flex...@googlegroups.com
Hi Chris,

Thanks for the info! My workflow is only ELAN-to-FLEx. I create:
- 1 title tear (interlinear-title-en, Tier Type: Text)
and for each speaker (A,B,C, etc):
- transcription tear (A_Transcription-txt-bbl, Tier Type: Phrases)
- words tear (A_Words-txt-bbl, Tier Type: Words, Parent Tier: Transcription)
- translation tear (A_Translation-gls-kat, Tier Type: Note, Parent Tier: Transcription)
- participant tag (A_Participant-note-en, Tier Type: Note, Parent Tier: Transcription)
bbl and kat are language codes

I then successfully create a .flextext file by exporting it; the XML looks good, at least the same as when I successfully imported it into earlier versions of FLEx. When I try to import it into the current FLEx, I get the error message " Interlinear Import failed. Are you sure you are importing a file in FLExText interlinear format? Word, Open Office, and Libre Office docs cannot yet be imported." I then get a new, but empty text in FLEx, with the title properly imported, but none of the baseline or anything else. I use ELAN 5.6 and FLEx 9.0.

Did you manage to solve (a part) of your problem? On another note, would you happen to know how export multiple speakers at once from ELAN to a toolbox format? I only seem to be able to export one tier...

Thanks!

-Jesse

Alexandre Arkhipov

unread,
Jan 23, 2020, 6:19:21 AM1/23/20
to flex...@googlegroups.com

Hi Jesse,

You might want to check that FLEx is actually using the exact same codes as you have specified.
I usually do it this way:

- create a dummy interlinear text in the FLEx project (if there are none already in there), with just one or two words in all the tiers you want (in this case baseline/transcription, translation and a Note with participant tag)
(note that FLEx does not import words or anything smaller than sentences, it will recreate the word and morph tiers itself)

- export it as flextext

- open the flextext in a Notepad++/any plain text editor and see what are the codes there.

Best,
Sasha

23/01/2020 11:51, Jesse Wichers Schreur пишет:
--
"FLEx list" messages are public. Only members can post.
flex_d...@sil.org
http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/CAMQh%3DgUuLDM0iROVsMyBY2AusbzZenJippq0KeF%2BCRJFo8d%3DwA%40mail.gmail.com.

Françoise Rose

unread,
Jan 23, 2020, 8:57:21 AM1/23/20
to flex...@googlegroups.com

Hi all,

Maybe you haven’t tokenized your transcription ? Flex does not use the transcription tier, but the Word one, if I understand well, to reconstitute the text tier. So you need to tokenize your texts in the Word tier before trying to import.

Let me share anyway the tutorial “working with Eland and Flex together” if you want to check every step.

I have no problem anymore exporting from Elan to Flex, not from Flex to ELAN (even with several speakers, and some Custom Fields in texts in Flex). Although I must say that in the past the help from the Elan team has been very efficient.

Good luck!

Françoise

 

De : flex...@googlegroups.com <flex...@googlegroups.com> De la part de Jesse Wichers Schreur
Envoyé : jeudi 23 janvier 2020 11:51
À : flex...@googlegroups.com
Objet : Re: [FLEx] Failure to import FLExTexts from ELAN

--

"FLEx list" messages are public. Only members can post.
flex_d...@sil.org

http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.

To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/CAMQh%3DgUuLDM0iROVsMyBY2AusbzZenJippq0KeF%2BCRJFo8d%3DwA%40mail.gmail.com.

Working with ELAN and FLEx together_2014-01-20.pdf

Chris W.

unread,
Jan 23, 2020, 1:42:51 PM1/23/20
to FLEx list
Hi Jesse,

I think the others have brought up useful points.  Given that you already have a word tier (which I assume is tokenized?), I'm not sure that step suggested by Françoise is necessary.

Before getting into the details, as Sasha mentioned, I do think that there is some kind of mismatch with the labeling that you are specifying with ELAN and what FLEx expects.  I realized after your message that I *also* had something like this as a third issue which I had forgotten about.  I found the error in a couple places on FLEx list, much earlier, but none of them immediately addressed my issue.  I think I solve this particular one through some trial and error - i.e. making sure my tier types (and their relationships) were correct *and* the mapping you do on the 3rd dialogue/screen of the Export FLEx file process.

This will probably take some back-and-forth troubleshooting.  Recall also, that different people have different needs for their tiers.  So, the exact mapping may vary slightly.

Nonetheless, FLEx is expecting mainly two things:
1) the Baseline text
2) a translation

I'm not sure if I've done something wrong, but FLEx doesn't recognize my Words or Morphemes tiers.  These are the tiers which have marked affixation and cliticization, for example.  So, I used my transcription tier (with punctuation, but without affix/clitic markers).  My process here worked for me, although someone may say that I didn't follow the correct process.  YMMV!  Anyhow, despite marking affixes/clitics, I unfortunately needed to mark these again in FLEx, but it wasn't pulling in the Words/Morphemes tier to the Gloss and Analyze tabs for the imported interlinear text.  (again, I don't know way...I'm just delaying with the behavior I get)

So, given those requirements and the behavior, I ended up with a tier structure like this:

AA_Transcription                       [Type: Transcription, time-alignable]
   + AA_Transcription(Ortho)      [Type: Transcription(Ortho), Symbolic Association]
   + AA_Translation                    [Type: Translation, Symbolic Association]
   + AA_Comments                     [Type: Comments, Symbolic Association]
   + AA_Words                            [Type: Words, Symbolic Subdivision]
        + AA_Morphemes              [Type: Morphemic, Symbolic Association]

(My Ortho tier is nearly identical to the regular transcription tier.  The difference is that Ortho has all punctuation and capitalization rules in the language.  I have this tier for my own reasons which are somewhat due to partial automation.  It is not used in FLEx, however.  I map it during the export process to the "lit" type since it is the literate equivalent of the transcription.)

Jumping to the export process now, here are the steps that I follow:

Step 1/4: Element Mapping
I leave this unchanged, but here is what it looks like.  See attachment image.

Step 2/4: Element-Item Configuration:
I leave this unchanged again

Step 3/4: Element-item 'type' and 'lang' attribute based on
See screenshot attached - I put it next to my tiers (listed above) for comparison

A couple notes/questions on the tier structure that you provided in your message.
1) Are you sure you want the translation tier to be a "Note" type?  Or should it instead be a "Translation" type? (I'm not sure this would cause problems...but it might?)
2) Why do you have a title tier that applies to everyone?  (You should probably *not* map this during the export process)

I hope this helps!  If you are still struggling, might I suggest that you save a new version of your ELAN file, delete all but the first transcription, and upload it here?  There are likely just one or two things that are tripping you up, I think.  This way, you can get some other people to take a look also.

Regarding your last two questions - Yes, I have solved everything.  As I mentioned at the top, this was actually a third one that I had and the one that I forgot how I fixed...  (I think it was also a mapping issue, but I tried different things for awhile and just got it working eventually).  Unfortunately, I have no experience with Toolbox.  Once you get this figured out, you might want to ask this as a new question.  I'm pretty sure there are some on this list who do have that experience.


Best,
Chris
step1_export_to_FLEx.png
step3_export_to_FLEx+tiers.png

nick.th...@gmail.com

unread,
Jul 19, 2021, 2:58:13 AM7/19/21
to FLEx list
I am having trouble exporting a single line of transcription from Elan into FLEx and then back to Elan. Is there any description of this procedure? I have tried following the latest Elan manual but need something else. The Flextext exported from Elan contains time offsets, but the flex export of that file does not, so Elan can't import it correctly.

Thanks,
Nick

Françoise Rose

unread,
Jul 19, 2021, 3:08:59 AM7/19/21
to flex...@googlegroups.com

Dear Nick,

I am using this manual (attached), maybe a bit outdated now!

You have to know that morphological analysis is retained from Flex to Elan, but not the other way around.

Good luck!

Françoise

 

De : flex...@googlegroups.com <flex...@googlegroups.com> De la part de nick.th...@gmail.com
Envoyé : lundi 19 juillet 2021 08:58
À : FLEx list <flex...@googlegroups.com>


Objet : Re: [FLEx] Failure to import FLExTexts from ELAN

 

I am having trouble exporting a single line of transcription from Elan into FLEx and then back to Elan. Is there any description of this procedure? I have tried following the latest Elan manual but need something else. The Flextext exported from Elan contains time offsets, but the flex export of that file does not, so Elan can't import it correctly.

--

"FLEx list" messages are public. Only members can post.
flex_d...@sil.org

http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.

To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/435fb5cf-d9ce-4d9c-9d5e-40a2117d7708n%40googlegroups.com.

Working with ELAN and FLEx together_2014-01-20.pdf

Nick Thieberger

unread,
Jul 19, 2021, 3:54:21 AM7/19/21
to flex...@googlegroups.com
Thanks Françoise for this help. I had hoped that the flow between Elan and Flex and back had improved a little since this document and that of John Mansfield, both now 6 or more years ago and maybe there are more recent examples of the workflow that someone on this list can point me to?

Nick

You received this message because you are subscribed to a topic in the Google Groups "FLEx list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/flex-list/A4ZIVCTP4EI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/99bb606f3a4c4b968c13151410d3c4a3%40univ-lyon2.fr.

Amelia

unread,
Jul 24, 2021, 1:01:13 AM7/24/21
to FLEx list
Hello all,

I am also encountering problems importing ELAN transcriptions into FLEx. I have followed the instructions as per the ELAN guide by Tim Gaved and Sophie Salffner (available here) and by Sara Petrollino (available here) which have been very useful so far. I also believe all my tiers and tier types have the correct settings, and I have tokenised my 'words' tier (see screenshot one and two, maybe there's an error here that I haven't noticed), but when I import my flextext file into FLEx (which contains a lexicon which I have built for Sa, isocode: sax),  I get no baseline and 23 lines of "an empty paragraph" in the analyse tab (see screenshot 3). 

There were 23 lines of transcription in the ELAN file, so I feel like I'm doing something right, but I don't know why this is happening.

Has anyone else had this issue or know how I might be able to solve it?

Best
Amelia
Screen Shot 2021-07-24 at 2.49.26 pm.png
Screen Shot 2021-07-24 at 2.45.24 pm.png
Screen Shot 2021-07-24 at 2.48.24 pm.png

Beth-docs Bryson

unread,
Jul 24, 2021, 10:20:28 AM7/24/21
to flex...@googlegroups.com
Can anyone comment on what version of FLEx they are using?

When the manual was written, I think FLEx was on version 8.x (8.1 or 8.2 or 8.3), or even 7.x.  In the transition from FW 9.0 to 9.1, the texts area is one of the areas that saw a lot of changes, and it is possible that something broke.  I don’t know if there were changes in that area between 8.3 and 9.0.

It would be helpful to know what version people had success with in the past and what version is failing now.

FW 9.1 is in beta, so this is a good time to be reporting bugs about it.  Certainly the number of people in this thread is a good indication that this feature is used a lot and relied on by a lot of people.  The more users a feature has, the higher the priority that will be placed on working on it.

-Beth

To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/e8dc06a4-c596-4475-9550-68d875c82cedn%40googlegroups.com.
<Screen Shot 2021-07-24 at 2.49.26 pm.png><Screen Shot 2021-07-24 at 2.45.24 pm.png><Screen Shot 2021-07-24 at 2.48.24 pm.png>

Chris W.

unread,
Jul 24, 2021, 2:12:36 PM7/24/21
to FLEx list
Hi All,

I spoke with John about his guide about 1-2 years ago.  It wasn't working for me either.  I believe it was because of structural changes to the XML between the FLEx version at the time he worked on it and more recently.

I worked on his XLST, which was no longer working, and eventually got it mostly working for myself.  The issue that I struggled with was that the .flextext from FLEx loses data that is in the exported .flextext from ELAN.  So, even when you make the round trip (ELAN-FLEx-ELAN), you end up with a much different looking file.

The only way around this was combining both .flextext files and grabbing some data from the .eaf file also.  But my approach is not particularly pleasant.  I put together a Python script (plus some attached images that it uses) to use the original .eaf and the two .flextext files.  I have attached the file here, but need to detail the unpleasantness below:

--

I tested with FLEx 9.0.7.0 RC and ELAN 5.9 on Windows 10.  I have Anaconda Python installed, plus the following packages:

conda install -y -c conda-forge numpy matplotlib pyside2 cchardet pydub scour pyautogui
pip install --no-input mouseinfo pygetwindow
conda install -y -c anaconda scikit-image scipy
conda install -y -c gagphil1 tkinterdnd2

I have only run this on Windows.  It probably needs some updates to run on MacOS or Linux.

You run the attached Python script Merge_ELAN_FLEx_flextext_GUI.py which opens up a GUI window.

You need to drag and drop the .eaf file and two .flextext onto the appropriately named buttons.  Used the following naming conventions for my files:
    - XYZ.eaf
    - XYZ.pfsx (I am assuming this file is in the same folder as the XYZ.eaf file)
    - XYZ_from_ELAN.flextext
    - XYZ_from_FLEx.flextext

Once all three files have been "attached", the "Merge .flextext files" button turns green.

At this point, it automates the rest of the process.  You will end up with XYZ_MERGED.eaf, XYZ_MERGED.flextext, and XYZ_MERGED.pfx files

--

While this process is fairly simple (minus the Python requirements), the automation part is actually horrible.  There is no command line interface that I could find with ELAN.  Unfortunately, you need to import the "from_FLEx" .flextex file and export a file to get this entire process working.

Without a command line interface, it means that the script needs to open up ELAN and send keystrokes to ELAN to open different menus, press different buttons, and write filenames to the Save dialog box.  You cannot use the mouse OR keyboard until the process completes, unless you want to risk breaking the process (and not getting your output files) and forcibly quitting the GUI window before retrying.

In addition to the ELAN process, the Python script runs an XLST transformation script in the background.

There are a bunch of temporary files created.  Some of these are put into the user's temporary folder (in Windows - again, this might not work properly for MacOS or Linux).  By the end of the process, there is also a new folder ("_ELAN-FLEx_flextext+pfsx_BACKUP_") which contains all of the temporary files, a backup of the original .eaf, .pfsx, and both .flextext files, and the newly merged files for ELAN.

--

Lastly, I just wanted to mention that I think FLEx is modifying the .flextext files in ways that are not seemless for returning to ELAN.  The fact that multiple people chimed in recently seems to confirm this.  While this might not be considered a bug, I think that it might be good to revisit the construction of the XML in these .flextext files so that my script is not necessary.

--

If anyone would like to put efforts together into throwing this in a Github project, getting it working for MacOS and Linux, and smoothing out any bugs, please let me know.  I can get it started for a collaboration.  I don't have MacOS and no familiarity with FLEx on Linux.  The preference would be to make an executable for the major OSes also, so that users do not need Python know-how.
file_checkmark_4.gif
file_checkmark_6.gif
Merge_ELAN_FLEx_flextext_GUI.py

Chris W.

unread,
Jul 24, 2021, 2:15:05 PM7/24/21
to FLEx list
Apologies about forgetting this in my previous message.  I have a Github repository created already with the files, if anyone wants to collaborate:

Chris W.

unread,
Jul 24, 2021, 5:36:22 PM7/24/21
to FLEx list
Hi Again,

I briefly skimmed the first few messages, e.g. from Nick, and was thinking about the round trip (ELAN-FLEx-ELAN) rather than noticing some posts were simply about difficulty importing ELAN>FLEx.  I will touch on my process (which is more or less identical to John Mansfield's document which I followed originally) in the hopes that anyone having difficulty for that specific task may figure out their issue.

As I mentioned in my earlier message, the version numbers I am using are:
FLEx 9.0.7.0 RC and ELAN 5.9 on Windows 10

My tier structure looks like:
(image ELAN_tier_structure.png)
ELAN_tier_structure.png

The complete attributes for one of my files is:
(image ELAN_change_tier_attributes.png)
ELAN_change_tier_attributes.png

When exporting in ELAN to .flextext, these are the three steps (not including specifying file name + path):
(images
ELAN_export_to_FLEx_1.png
ELAN_export_to_FLEx_2.png
ELAN_export_to_FLEx_3.png)
ELAN_export_to_FLEx_1.png
ELAN_export_to_FLEx_2.png
ELAN_export_to_FLEx_3.png

Upon importing the .flextext file into FLEx>File>Import>FLExText Interlinear... my analyze tab looks like:
(image FLEx_after_importing_flextext.png)
FLEx_after_importing_flextext.png

Hope that helps!

Best,
Chris
ELAN_change_tier_attributes.png
ELAN_export_to_FLEx_3.png
ELAN_export_to_FLEx_2.png
ELAN_tier_structure.png
FLEx_after_importing_flextext.png
ELAN_export_to_FLEx_1.png
Reply all
Reply to author
Forward
0 new messages