Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Welcome to the FLExTools wiki!
8 August 2016: v1.2.5 released. This version works with FieldWorks 8.3.0 and Python 2.7.11. See history.txt for a full list of changes.
See the Requirements and Setup sections below for installation information. (Note that the code isn't here on GitHub yet.)
Table of Contents
FLExTools is an application for running Python scripts against a Fieldworks database. All the UI and script management is provided. Simply create a small Python script (a Module) to do the processing work and then run it from FLExTools. Modules can be grouped into Collections so that a whole set of scripts can be run with one button click.
FLExTools operates on lexical or textual data to do such things as:
- Consistency checks
- Report on missing data or duplicate data
- Create custom reports or export formats
- Perform custom analysis
- Update fields in ways that aren't convenient within FLEx
The following modules are included:
- Reports.Lexeme_Usage_In_Corpus: counts usage of lexemes in the text corpus.
- Reports.Text_Statistics: reports word-counts and averages for all texts.
- Reports.Lexicon_Statistics: reports how many senses have definitions and examples.
- Reports.Database_Information: lists writing systems, custom fields, and parts of speech.
- Export.Dump_All_Headwords_To_File: writes all headwords to a text file.
- Export.Dump_Published_Headwords_To_File: writes all published headwords to a text file.
- Export.Dump_Texts_To_File: writes all texts to a text file.
- Duplicates.Find_Duplicate_Entries: finds potential duplicate entries and tags them ready for merging.
- Duplicates.Merge_Entries: merges entries according to user-defined control tags.
- Duplicates.Merge_Senses: merges duplicate senses.
- Chinese.Update_Tonenumber_Fields: generates Pinyin with tone numbers from Chinese characters.
- Chinese.Update_Pinyin_Fields: generates Pinyin with tone diacritics from the tone numbers.
- Chinese.Update_Reversal_Sort_Field: generates a Chinese sort field for the Chinese Reversal Index.
- Chinese.Generate_Reversal_Sort_Field_Only: generates the sort field for the Chinese Reversal Index without updating Pinyin in the lexicon.
- Utilities.Approve_Spelling_of_Numbers: sets the spelling status to Approved for all numerical wordforms (e.g. "100".)
- 32 bit Python 2.5, 2.6 or 2.7 (python.org)
- Fieldworks 7.2 or greater, or Fieldworks 8 (sil.org)
- Windows and .NET (Note that 32 bit Python is required even on 64 bit Windows)
- Unzip FLExTools to a folder where you have read/write access (i.e. not C:\Program Files.)
For debugging, run FlexTools_Debug.bat and check error.log for more information.
The zip file also contains some extras:
- The CustomUtilities directory contains stand-alone Python scripts demonstrating some things you can do, such as checking example fields, adding items to the semantic domain field, or analysing text data using the nltk toolkit. To use any of this code within FLExTools itself, create a new Module (copy one of the example Modules), and then edit/add what you need from these examples.
- The module FlexLibs/FlexDBAccess.py is a wrapper class for working with a Flex database. If you come up with other useful methods to add please email me.
FlexicanJumpingBean is a simple utility to jump to places in FLEx from a taskbar icon. Useful for doing a Fieldworks presentation where you want to show different parts of the application without having to take the time to navigate there.
- Requires WxPython
- The FieldWorks database is accessed through an interface called FDO. See Python database access.doc on the FieldWorks site for more information on using FDO with Python.
- FlexApps uses Python.NET to work with Fieldworks. IronPython could theoretically be used, however I had problems when I first tried, and haven't tried again in the last few years.