diff --git a/index.js b/index.js index e7396cd61..df6079be2 100644 --- a/index.js +++ b/index.js @@ -1216,6 +1216,12 @@ INDEX=[ "func":1 }, { +"ref":"tf.advanced.app.App.featureTypes", +"url":16, +"doc":"For which node types is each feature defined? It computes on the fly for each feature the node types for which the feature has defined values. Parameters show: boolean, optional True Whether to output the result in pretty markdown. Returns - dict If show is true, None is returned, but if show is false, a dict is returned, keyed by features and the value for each feature is the list of types for which it has defined values.", +"func":1 +}, +{ "ref":"tf.advanced.app.App.context", "url":16, "doc":"Result of interpreting all configuration options in config.yaml ." @@ -2009,7 +2015,7 @@ INDEX=[ { "ref":"tf.core.files.annotateDir", "url":33, -"doc":"Return the input and output and report directories for a specific annotation tool. The input directory is located next to the TF data of the corpus The output directory is located in the _temp directory next to the TF data of the corpus The report directory is located in the report directory next to the TF data of the corpus Parameters app: object the TF app tool: string The name of the annotation tool Returns - string The path of the working directory for that tool and that corpus", +"doc":"Return the input and output and report directories for a specific annotation tool. The input directory is located next to the TF data of the corpus The output directory is located in the _temp directory next to the TF data of the corpus of the corpus Parameters app: object the TF app tool: string The name of the annotation tool Returns - string The path of the working directory for that tool and that corpus", "func":1 }, { @@ -3592,7 +3598,7 @@ INDEX=[ { "ref":"tf.about.releases", "url":72, -"doc":" Release notes ! hint \"Consult the tutorials after changes\" When we change the API, we make sure that the tutorials show off all possibilities. See the app-specific tutorials via tf.about.corpora . - The TEI converter is still in active development. If you need the latest version, clone the TF repo and in its top-level directory run the command: sh pip install -e . 12 12.5 12.5.1 2024-06-06 WATM production tweaks: By default, WATM files are written to versioned directories inside the _temp directory. Existing data may be overwritten. However, if you pass a flag indicating that it is for production, the result is written to a new versioned directory inside watm . The new versioned directories created in this way have a suffix -001 , -002 , etc. This helps to keep published WATM fixed. NER more refined entity lookup When looking up entities on the basis of spreadsheet instructions, you can now give spreadsheets for the whole corpus, and for sections and subsections and ranges of them. The more specificly targeted spreadsheets override the more generally targeted ones. The lookup is also more efficient, and it prefers longer matches over shorter ones. After the lookup, a detailed tsv file is generated with details information about the hits: to which triggers in which spreadsheet they correspond, and how many are found in which paragraphs. 12.5.0 2024-05-28 Fixes in NER Browser: If you click a chunk heading you get a box with the whole section, scrollable, just above the section. Previously, you got this at the end of the chunk, which could be confusing if the chunk is long and the context box disappears below the bottom of the page. When looking for complex names and translating such names into tokens, leave out tokens that are just spaces. The NER browser will repeatedly read the list of annotation sets. This is needed when sets have been added or deleted from outside the NER browser. You do not have to restart the NER browser in that case. Hyphenated occurrences were not found. That has been fixed, without decreasing the speed of the algorithm too much. Once a set of entities has been marked, it can now also be baked into the TF dataset. Fix in display algorithm In plain display, when a line break occurs, we needed a trick to make it happen, because such a display is a flex box. A simple has no effect. We found the trick and it worked. However, if the break occurs in something that is also highlighted, the trick did not work anymore, because the highlight introduces an extra level. We fixed it by disrupting the extra span level for the tricked br and resuming it after the br. 12.4 12.4.5,6 2024-05-13 Fix in the autodownload by TF. When TF downloads the complete.zip of a corpus and extracts it, it does not remove previously exisiting files in the directories in which the data files land. That pre-existing material can interfere in surprising ways with the resulting dataset, as Christian H\u00f8jgaard experienced (thanks Christian for reporting it and taking the time to help me pinpoint the culprit). The fix is that TF first inspects the complete.zip and determines what the folders are in which the file __checkout__.txt exists. These are the folders that do not tolerate pre-existing material. The will be deleted before extracting the zip file. Fix in displaying nodes by means of pretty() . Sometimes an error is raised when composing the features and values that should be displayed for a node (spotted by Cody Kingham, thanks). It happens in cases where you want to show a feature of a related node on a node, but the related node does not exist. In that case TF tries to access an undefined variable. That has been fixed. Now these cases will not raise errors, but you might still be surprised by the fact that in some cases the related node does not exist. 12.4.3,4 2024-05-08 Fix in TF browser, spotted by Jorik Groen. When exporting query results, the values features used in the query were not written to the table at all. The expected behaviour was that features used in the query lead to extra columns in the exported table. It has been fixed. The cause was an earlier fix in the display of features in query results. This new fix only affects the export function from the browser, not the tf.advanced.display.export function, which did not have this bug. The pipeline from TEI or PageXML via TF to WATM is a complex thing to steer. There is now a new class tf.convert.makewatm that takes care of this: it provides a command line interface to perform the necessary convert steps. Moreover, you can use it as a base class and extend it with additional convert steps and options, with minimal code. 12.4.2 2024-04-24 Tiny fixes in the TEI and WATM conversions. 12.4.1 2024-04-24 Improvements in the TEI and WATM conversions. 12.4.0 2024-04-21 Support for [Marimo notebooks](https: docs.marimo.io/index.html). TF detects when its run in a notebook, and also in what kind of notebook: ipython (~ Jupyter) or marimo . When it needs to display material in the output of a cell, it will choose the methods that are suitable for the kind of notebook it is working in. 12.3 12.3.7 2024-04-19 Improvements in tf.convert.watm : the resulting data is much more compact, because: you can choose to export it as TSV instead of JSON; no annotations of type node are produced anymore, they only served to map annotations and text segments to TF nodes; now that mapping is exported as a simple TSV file; you can opt to exclude an arbitrary set of tags from being exported as WATM annotations. 12.3.6 2024-04-16 Minimal fixes in tf.convert.tei : it can handle a biography. Fixed prettyTuple() when passed _asString=True : it did not pass this on to pretty() which caused a Python error. 12.3.5 2024-03-26 extra functionality: When adding types with tf.dataset.modify you can link nodes of a newly added type to nodes that were added as the preiviously added type. This is a bit of a limited and ad hoc extension of the functionality of this function. I needed a quick fix to add nodes for entities and entity occurrences at the same time and link them with edges. This is for the corpus [ CLARIAH/wp6-missieven ](https: github.com/CLARIAH/wp6-missieven). fix: the express download of a dataset (complete.zip) was nit triggered in all cases where it should. 12.3.4 2024-02-26 The output of tf.convert.watm has been changed. It now generates token files per section, where you can configure the TF section level for that. The syntax for targets has been changed: more things are possible. Tests have been adapted and strengthened. 12.3.3 2024-02-20 Fix in tf.advanced.repo.publishRelease : it did not work if you are on a branch named main because master was hard-coded in the source code. Now it takes the branch name from the app context. Do not forget to specify branch: main under the provenanceSpecs in your /app/config.yaml . Many thanks to Tony Jorg for reporting this error. 12.3.1,2 2024-02-15 Minor improvements to the WATM converter, and an update of its docs. 12.3.0 2024-02-08 A new data export conversion, from TF to WATM. See tf.convert.watm . WATM is a not yet hardened data format that powers the publishing line for text and annotations built by Team Text at [KNAW/HuC Digital Infrastructure](https: di.huc.knaw.nl/text-analysis-en.html). Currently this export is used for the corpora [Mondriaan Proeftuin](https: github.com/annotation/mondriaan) [Suriano Letters](https: gitlab.huc.knaw.nl/suriano/letters) [TransLatin Corpus](https: gitlab.huc.knaw.nl/translatin/corpus) Small fixes in tf.convert.addnlp : when the NLP data is integrated in the TF dataset, the NLP-generated features will get some metadata 12.2 12.2.8,9,10 2024-01-24/25 TF can auto-download extra data with a TF dataset, e.g. a directory with named entities ( ner ) as in the [suriano corpus](https: gitlab.huc.knaw.nl/suriano/letters). However, this only worked when the repo was in the github backend and the extra data had been packed for express-download and attached to a release. Now it also works with the normal download methods using the GitHub and GitLab APIs. So, after the move of Suriano from GitHub to GitLab, this functionality is still available. There was a glitch in the layout of the NER tool which caused section labels to be chopped off at the margin, only in notebooks. Thats has been fixed by moving some CSS code from one file to an other. 12.2.7 2024-01-23 There were issues with starting up the Text-Fabric browser: If the system could not start the browser, the TF stopped the webserver. That is not helpful, because one can always open a browser and enter the url in the address bar. Now TF shows the url rather prominently when it does not open a browser. If debug mode is on, Flask reloads the whole process, and that might include opening the browser as well. Now Flask only opens the browser after the startup of the webserver, and not anymore after successive reloads. 12.2.6 2024-01-15 Somehow the express way of downloading data (via complete.zip attached to the latest release) did not get triggered in all cases where it should. It is now triggered in more cases than before. 12.2.5 2023-12-18 Small fix in NER browser: prevent submitting the form if the focus is in a textarea field or in an input field that does not have type=submit. 12.2.3,4 2023-12-09 Writing support for Ugaritic, thanks to Martijn Naaijer and Christian H\u00f8jgaard for converting a Ugaritic corpus to TF. Fix in display functions (continued): The logic of feature display, fixed in the previous version, was not effective when things are displayed in the TF browser. Because in the TF browser the features of the last query were passed as extraFeatures instead of tupleFeatures . This has been fixed by using tupleFeatures in the TF browser as well. 12.2.2 2023-12-02 Fix in display functions, thanks to Tony Jurg: if you do A.pretty(x, queryFeatures=False, extraFeatures=\"yy zz\") the extra features were not shown. So there was no obvious way to control exactly the features that you want to show in a display. That has been fixed. Further clarification: the node features that are used by a query are stored in the display option tupleFeatures . That is what causes them to be displayed in subsequent display statements. You can also explicitly set/pass the tupleFeatures parameter. However, the fact that queryFeatures=False prohibited the display of features mentioned in extraFeatures was against the intuitions. Improvements in the PageXML conversion. There are token features str , after that reflect the logical tokens There are token features rstr , rafter that reflect the physical tokens The distincition between logical and physical is that physical token triplets with the soft hyphen as the middle one, are joined to one logical token; this happens across line boundaries, but also region and page boundaries. 12.2.0,1 2023-11-28 New conversion tool: from PageXML. Still in its infancy. It uses the [PageXML tools](https: github.com/knaw-huc/pagexml) by Marijn Koolen. For an example see [translatin/logic](https: gitlab.huc.knaw.nl/translatin/logic/-/blob/main/tools/convertPlain.ipynb?ref_type=heads). Fix: TF did not fetch an earlier version of a corpus if the newest release contains a complete.zip (which only has the latest version). For some technical reason that still escapes me, the TF browser was slow to start. Fixed it by saying threaded=True to Flask, as suggested on [stackoverflow](https: stackoverflow.com/a/11150849/15236220) From now on: TF does not try to download complete.zip if you pass a version argument to the use() command. 12.1 12.1.6,7 2023-11-15 Various fixes: Some package data was not included for the NER annotation tool. In the NER tool, the highlighting of hits of the search pattern is now exact, it was sometimes off. Deleted tf.tools.docsright again, but developed it further in [docsright](https: github.com/annotation/docsright). 12.1.5 2023-11-02 Improvement in dependencies. Text-Fabric is no longer mandatory dependent on openpyxl , pandas , pyarrow , lxml . The optional dependencies on pygithub and python-gitlab remain, but most users will never need them, because TF can also fetch the complete.zip that is available as release asset for most corpora. Whenever TF invokes a module that is not in the mandatory dependencies, it will act gracefully, providing hints to install the modules in question. 12.1.3,4 2023-11-01 API change in the Annotator: Calling the annotator is now easier: A.makeNer() (No need to make an additional import statement.) This will give you access to all annotation methods, including using a spreadsheet to read annotation instructions from. Removal of deprecated commands (on the command line) in version 11: text-fabric (has become tf ) text-fabric-zip (has become tf-zip ) text-fabric-make (has become tf-make ) Bug fixes: [ 81](https: github.com/annotation/text-fabric/issues/81) and [ 82](https: github.com/annotation/text-fabric/issues/82) Spell-checked all bits of the TF docs here (33,000 lines). Wrote a script tf.tools.docsright to separate the code content from the markdown content, and to strip bits from the markdown content that lead to false positives for the spell checker. Then had the Vim spell checker run over those lines and corrected all mistakes by hand. Still, there might be grammar errors and content inaccuracies. 12.1.4 follows 12.1.3. quickly, because in corpora without a NER configuration file, TF did not start up properly. 12.1.1,2 2023-10-29 Bug fix: the mechanism to make individual exceptions when adding named entities in the tf.browser.ner.annotate tool was broken. Thanks to Daniel Swanson for spotting it. Additional fixes and enhancements. 12.1.0 2023-10-28 New stuff In the TF browser there will be a new tab in the vertical sidebar: Annotate , which will give access to manual annotation tools. I am developing the first one, a tool to annotate named entities efficiently, both in the TF browser and in a Jupyter Notebook. Reed more in tf.about.annotate . These tools will let you save your work as files on your own computer. In tf.convert.addnlp we can now extract more NLP information besides tokens and sentences: part-of-speech, morphological tagging, lemmatisation, named entity recognition Fixes in the TEI converter. 12.0 12.0.6,7 2023-09-13 Trivial fix in code that exports the data from a job in the TF browser. In the meanwhile there is unfinished business in the Annotate tab in the TF browser, that will come into production in the upcoming 12.1 release. The Chrome browser has an attractive feature that other browsers such as Safari lack: It supports the CSS property [content-visibility](https: developer.mozilla.org/en-US/docs/Web/CSS/content-visibility). With this property you can prevent the browser to do the expensive rendering of content that is not visible on the screen. That makes it possible to load a lot of content in a single page without tripping up the browser. You also need the [ IntersectionObserver API](https: developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API), but that is generally supported by browsers. With the help of that API you can restrict the binding of event listeners to elements that are visible on the screen. So, you can open the TF browser in Chrome by passing the option chrome . But if Chrome is not installed, it will open in the default browser anyway. Also, when the opening of the browser fails somehow, the web server is stopped. 12.0.5 2023-07-10 Fixed references to static files that still went to /server instead of /browser . This has to do with the new approach to the TF browser. 12.0.0-4 2023-07-05 Simplification The TF browser no longer works with a separate process that holds the TF corpus data. Instead, the web server (flask) loads the corpus itself. This will restrict the usage of the TF browser to local-single-user scenarios. TF no longer exposes the installation options [browser, pandas] pip install 'text-fabric[browser]' pip install 'text-fabric[pandas]' If you work with Pandas (like exporting to Pandas) you have to install it yourself: pip install pandas pyarrow The TF browser is always supported. The reason to have these distinct capabilities was that there are python libraries involved that do not install on the iPad. The simplification of the TF browser makes it possible to be no longer dependent on these modules. Hence, TF can be installed on the iPad, although the TF browser works is not working there yet. But the auto-downloading of data from GitHub / GitLab works. Minor things Header. After loading a dataset, a header is shown with shows all kinds of information about the corpus. But so far, it did not show the TF app settings. Now they are included in the header. There are two kinds: the explicitly given settings and the derived and computed settings. The latter ones will be suppressed when loading a dataset in a Jupyter notebook, because these settings can become quite big. You can still get them with A.showContext() . In the TF browser they will be always included, you find it in the Corpus tab. - Older releases See tf.about.releasesold ." +"doc":" Release notes ! hint \"Consult the tutorials after changes\" When we change the API, we make sure that the tutorials show off all possibilities. See the app-specific tutorials via tf.about.corpora . - The TEI converter is still in active development. If you need the latest version, clone the TF repo and in its top-level directory run the command: sh pip install -e . 12 12.5 12.5.2 2024-06-13 New function to show the types for which each feature has defined values. Thanks to Marek Pol\u00e1\u0161ek for asking for it, writing an algorithm to produce this information, and then speeding it up 10-fold! For details see this [cookbook](https: nbviewer.org/github/ETCBC/bhsa/blob/master/tutorial/cookbook/lexemes.ipynb) Working on integrating NER by spreadsheet in the TF browser. This is currently in an unfinished state. 12.5.1 2024-06-06 WATM production tweaks: By default, WATM files are written to versioned directories inside the _temp directory. Existing data may be overwritten. However, if you pass a flag indicating that it is for production, the result is written to a new versioned directory inside watm . The new versioned directories created in this way have a suffix -001 , -002 , etc. This helps to keep published WATM fixed. NER more refined entity lookup When looking up entities on the basis of spreadsheet instructions, you can now give spreadsheets for the whole corpus, and for sections and subsections and ranges of them. The more specificly targeted spreadsheets override the more generally targeted ones. The lookup is also more efficient, and it prefers longer matches over shorter ones. After the lookup, a detailed tsv file is generated with details information about the hits: to which triggers in which spreadsheet they correspond, and how many are found in which paragraphs. 12.5.0 2024-05-28 Fixes in NER Browser: If you click a chunk heading you get a box with the whole section, scrollable, just above the section. Previously, you got this at the end of the chunk, which could be confusing if the chunk is long and the context box disappears below the bottom of the page. When looking for complex names and translating such names into tokens, leave out tokens that are just spaces. The NER browser will repeatedly read the list of annotation sets. This is needed when sets have been added or deleted from outside the NER browser. You do not have to restart the NER browser in that case. Hyphenated occurrences were not found. That has been fixed, without decreasing the speed of the algorithm too much. Once a set of entities has been marked, it can now also be baked into the TF dataset. Fix in display algorithm In plain display, when a line break occurs, we needed a trick to make it happen, because such a display is a flex box. A simple has no effect. We found the trick and it worked. However, if the break occurs in something that is also highlighted, the trick did not work anymore, because the highlight introduces an extra level. We fixed it by disrupting the extra span level for the tricked br and resuming it after the br. 12.4 12.4.5,6 2024-05-13 Fix in the autodownload by TF. When TF downloads the complete.zip of a corpus and extracts it, it does not remove previously exisiting files in the directories in which the data files land. That pre-existing material can interfere in surprising ways with the resulting dataset, as Christian H\u00f8jgaard experienced (thanks Christian for reporting it and taking the time to help me pinpoint the culprit). The fix is that TF first inspects the complete.zip and determines what the folders are in which the file __checkout__.txt exists. These are the folders that do not tolerate pre-existing material. The will be deleted before extracting the zip file. Fix in displaying nodes by means of pretty() . Sometimes an error is raised when composing the features and values that should be displayed for a node (spotted by Cody Kingham, thanks). It happens in cases where you want to show a feature of a related node on a node, but the related node does not exist. In that case TF tries to access an undefined variable. That has been fixed. Now these cases will not raise errors, but you might still be surprised by the fact that in some cases the related node does not exist. 12.4.3,4 2024-05-08 Fix in TF browser, spotted by Jorik Groen. When exporting query results, the values features used in the query were not written to the table at all. The expected behaviour was that features used in the query lead to extra columns in the exported table. It has been fixed. The cause was an earlier fix in the display of features in query results. This new fix only affects the export function from the browser, not the tf.advanced.display.export function, which did not have this bug. The pipeline from TEI or PageXML via TF to WATM is a complex thing to steer. There is now a new class tf.convert.makewatm that takes care of this: it provides a command line interface to perform the necessary convert steps. Moreover, you can use it as a base class and extend it with additional convert steps and options, with minimal code. 12.4.2 2024-04-24 Tiny fixes in the TEI and WATM conversions. 12.4.1 2024-04-24 Improvements in the TEI and WATM conversions. 12.4.0 2024-04-21 Support for [Marimo notebooks](https: docs.marimo.io/index.html). TF detects when its run in a notebook, and also in what kind of notebook: ipython (~ Jupyter) or marimo . When it needs to display material in the output of a cell, it will choose the methods that are suitable for the kind of notebook it is working in. 12.3 12.3.7 2024-04-19 Improvements in tf.convert.watm : the resulting data is much more compact, because: you can choose to export it as TSV instead of JSON; no annotations of type node are produced anymore, they only served to map annotations and text segments to TF nodes; now that mapping is exported as a simple TSV file; you can opt to exclude an arbitrary set of tags from being exported as WATM annotations. 12.3.6 2024-04-16 Minimal fixes in tf.convert.tei : it can handle a biography. Fixed prettyTuple() when passed _asString=True : it did not pass this on to pretty() which caused a Python error. 12.3.5 2024-03-26 extra functionality: When adding types with tf.dataset.modify you can link nodes of a newly added type to nodes that were added as the preiviously added type. This is a bit of a limited and ad hoc extension of the functionality of this function. I needed a quick fix to add nodes for entities and entity occurrences at the same time and link them with edges. This is for the corpus [ CLARIAH/wp6-missieven ](https: github.com/CLARIAH/wp6-missieven). fix: the express download of a dataset (complete.zip) was nit triggered in all cases where it should. 12.3.4 2024-02-26 The output of tf.convert.watm has been changed. It now generates token files per section, where you can configure the TF section level for that. The syntax for targets has been changed: more things are possible. Tests have been adapted and strengthened. 12.3.3 2024-02-20 Fix in tf.advanced.repo.publishRelease : it did not work if you are on a branch named main because master was hard-coded in the source code. Now it takes the branch name from the app context. Do not forget to specify branch: main under the provenanceSpecs in your /app/config.yaml . Many thanks to Tony Jorg for reporting this error. 12.3.1,2 2024-02-15 Minor improvements to the WATM converter, and an update of its docs. 12.3.0 2024-02-08 A new data export conversion, from TF to WATM. See tf.convert.watm . WATM is a not yet hardened data format that powers the publishing line for text and annotations built by Team Text at [KNAW/HuC Digital Infrastructure](https: di.huc.knaw.nl/text-analysis-en.html). Currently this export is used for the corpora [Mondriaan Proeftuin](https: github.com/annotation/mondriaan) [Suriano Letters](https: gitlab.huc.knaw.nl/suriano/letters) [TransLatin Corpus](https: gitlab.huc.knaw.nl/translatin/corpus) Small fixes in tf.convert.addnlp : when the NLP data is integrated in the TF dataset, the NLP-generated features will get some metadata 12.2 12.2.8,9,10 2024-01-24/25 TF can auto-download extra data with a TF dataset, e.g. a directory with named entities ( ner ) as in the [suriano corpus](https: gitlab.huc.knaw.nl/suriano/letters). However, this only worked when the repo was in the github backend and the extra data had been packed for express-download and attached to a release. Now it also works with the normal download methods using the GitHub and GitLab APIs. So, after the move of Suriano from GitHub to GitLab, this functionality is still available. There was a glitch in the layout of the NER tool which caused section labels to be chopped off at the margin, only in notebooks. Thats has been fixed by moving some CSS code from one file to an other. 12.2.7 2024-01-23 There were issues with starting up the Text-Fabric browser: If the system could not start the browser, the TF stopped the webserver. That is not helpful, because one can always open a browser and enter the url in the address bar. Now TF shows the url rather prominently when it does not open a browser. If debug mode is on, Flask reloads the whole process, and that might include opening the browser as well. Now Flask only opens the browser after the startup of the webserver, and not anymore after successive reloads. 12.2.6 2024-01-15 Somehow the express way of downloading data (via complete.zip attached to the latest release) did not get triggered in all cases where it should. It is now triggered in more cases than before. 12.2.5 2023-12-18 Small fix in NER browser: prevent submitting the form if the focus is in a textarea field or in an input field that does not have type=submit. 12.2.3,4 2023-12-09 Writing support for Ugaritic, thanks to Martijn Naaijer and Christian H\u00f8jgaard for converting a Ugaritic corpus to TF. Fix in display functions (continued): The logic of feature display, fixed in the previous version, was not effective when things are displayed in the TF browser. Because in the TF browser the features of the last query were passed as extraFeatures instead of tupleFeatures . This has been fixed by using tupleFeatures in the TF browser as well. 12.2.2 2023-12-02 Fix in display functions, thanks to Tony Jurg: if you do A.pretty(x, queryFeatures=False, extraFeatures=\"yy zz\") the extra features were not shown. So there was no obvious way to control exactly the features that you want to show in a display. That has been fixed. Further clarification: the node features that are used by a query are stored in the display option tupleFeatures . That is what causes them to be displayed in subsequent display statements. You can also explicitly set/pass the tupleFeatures parameter. However, the fact that queryFeatures=False prohibited the display of features mentioned in extraFeatures was against the intuitions. Improvements in the PageXML conversion. There are token features str , after that reflect the logical tokens There are token features rstr , rafter that reflect the physical tokens The distincition between logical and physical is that physical token triplets with the soft hyphen as the middle one, are joined to one logical token; this happens across line boundaries, but also region and page boundaries. 12.2.0,1 2023-11-28 New conversion tool: from PageXML. Still in its infancy. It uses the [PageXML tools](https: github.com/knaw-huc/pagexml) by Marijn Koolen. For an example see [translatin/logic](https: gitlab.huc.knaw.nl/translatin/logic/-/blob/main/tools/convertPlain.ipynb?ref_type=heads). Fix: TF did not fetch an earlier version of a corpus if the newest release contains a complete.zip (which only has the latest version). For some technical reason that still escapes me, the TF browser was slow to start. Fixed it by saying threaded=True to Flask, as suggested on [stackoverflow](https: stackoverflow.com/a/11150849/15236220) From now on: TF does not try to download complete.zip if you pass a version argument to the use() command. 12.1 12.1.6,7 2023-11-15 Various fixes: Some package data was not included for the NER annotation tool. In the NER tool, the highlighting of hits of the search pattern is now exact, it was sometimes off. Deleted tf.tools.docsright again, but developed it further in [docsright](https: github.com/annotation/docsright). 12.1.5 2023-11-02 Improvement in dependencies. Text-Fabric is no longer mandatory dependent on openpyxl , pandas , pyarrow , lxml . The optional dependencies on pygithub and python-gitlab remain, but most users will never need them, because TF can also fetch the complete.zip that is available as release asset for most corpora. Whenever TF invokes a module that is not in the mandatory dependencies, it will act gracefully, providing hints to install the modules in question. 12.1.3,4 2023-11-01 API change in the Annotator: Calling the annotator is now easier: A.makeNer() (No need to make an additional import statement.) This will give you access to all annotation methods, including using a spreadsheet to read annotation instructions from. Removal of deprecated commands (on the command line) in version 11: text-fabric (has become tf ) text-fabric-zip (has become tf-zip ) text-fabric-make (has become tf-make ) Bug fixes: [ 81](https: github.com/annotation/text-fabric/issues/81) and [ 82](https: github.com/annotation/text-fabric/issues/82) Spell-checked all bits of the TF docs here (33,000 lines). Wrote a script tf.tools.docsright to separate the code content from the markdown content, and to strip bits from the markdown content that lead to false positives for the spell checker. Then had the Vim spell checker run over those lines and corrected all mistakes by hand. Still, there might be grammar errors and content inaccuracies. 12.1.4 follows 12.1.3. quickly, because in corpora without a NER configuration file, TF did not start up properly. 12.1.1,2 2023-10-29 Bug fix: the mechanism to make individual exceptions when adding named entities in the tf.browser.ner.annotate tool was broken. Thanks to Daniel Swanson for spotting it. Additional fixes and enhancements. 12.1.0 2023-10-28 New stuff In the TF browser there will be a new tab in the vertical sidebar: Annotate , which will give access to manual annotation tools. I am developing the first one, a tool to annotate named entities efficiently, both in the TF browser and in a Jupyter Notebook. Reed more in tf.about.annotate . These tools will let you save your work as files on your own computer. In tf.convert.addnlp we can now extract more NLP information besides tokens and sentences: part-of-speech, morphological tagging, lemmatisation, named entity recognition Fixes in the TEI converter. 12.0 12.0.6,7 2023-09-13 Trivial fix in code that exports the data from a job in the TF browser. In the meanwhile there is unfinished business in the Annotate tab in the TF browser, that will come into production in the upcoming 12.1 release. The Chrome browser has an attractive feature that other browsers such as Safari lack: It supports the CSS property [content-visibility](https: developer.mozilla.org/en-US/docs/Web/CSS/content-visibility). With this property you can prevent the browser to do the expensive rendering of content that is not visible on the screen. That makes it possible to load a lot of content in a single page without tripping up the browser. You also need the [ IntersectionObserver API](https: developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API), but that is generally supported by browsers. With the help of that API you can restrict the binding of event listeners to elements that are visible on the screen. So, you can open the TF browser in Chrome by passing the option chrome . But if Chrome is not installed, it will open in the default browser anyway. Also, when the opening of the browser fails somehow, the web server is stopped. 12.0.5 2023-07-10 Fixed references to static files that still went to /server instead of /browser . This has to do with the new approach to the TF browser. 12.0.0-4 2023-07-05 Simplification The TF browser no longer works with a separate process that holds the TF corpus data. Instead, the web server (flask) loads the corpus itself. This will restrict the usage of the TF browser to local-single-user scenarios. TF no longer exposes the installation options [browser, pandas] pip install 'text-fabric[browser]' pip install 'text-fabric[pandas]' If you work with Pandas (like exporting to Pandas) you have to install it yourself: pip install pandas pyarrow The TF browser is always supported. The reason to have these distinct capabilities was that there are python libraries involved that do not install on the iPad. The simplification of the TF browser makes it possible to be no longer dependent on these modules. Hence, TF can be installed on the iPad, although the TF browser works is not working there yet. But the auto-downloading of data from GitHub / GitLab works. Minor things Header. After loading a dataset, a header is shown with shows all kinds of information about the corpus. But so far, it did not show the TF app settings. Now they are included in the header. There are two kinds: the explicitly given settings and the derived and computed settings. The latter ones will be suppressed when loading a dataset in a Jupyter notebook, because these settings can become quite big. You can still get them with A.showContext() . In the TF browser they will be always included, you find it in the Corpus tab. - Older releases See tf.about.releasesold ." }, { "ref":"tf.about.clientmanual", @@ -4139,6 +4145,36 @@ INDEX=[ "func":1 }, { +"ref":"tf.browser.ner.sheets.Sheets.showLog", +"url":98, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.sheets.Sheets.clearLog", +"url":98, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.sheets.Sheets.readLog", +"url":98, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.sheets.Sheets.writeLog", +"url":98, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.sheets.Sheets.log", +"url":98, +"doc":"", +"func":1 +}, +{ "ref":"tf.browser.ner.sheets.Sheets.processSheet", "url":98, "doc":"Generates derived data structures out of the source sheet. After loading we process the set into derived data structures. We try to be lazy. We only load a set from disk if it is not already in memory, or if the set on disk has been updated since the last load. The resulting data is stored in the current set under the various keys. After processing, the time of processing is recorded, so that it can be observed if the processed set is no longer up to date w.r.t. the source. For each such set we produce several data structures, which we store under the following keys: dateProcessed : datetime when the set was last processed entityText : dict, text of entity by entity node or line number in TSV file; inventory : result of looking up all triggers Parameters changed: boolean Whether the set has changed since last processing.", @@ -4416,7 +4452,7 @@ INDEX=[ { "ref":"tf.browser.ner.serve.Serve.wrapSets", "url":102, -"doc":"HTML for the annotation set chooser. It is a list of buttons, each corresponding to an existing annotation set. A click on the button selects that set. There is also a control to delete the set. Apart from these buttons there is a button to switch to the entities that are present in the TF dataset as nodes of the entity type specified in the YAML file with corresponding features. Finally, it is possible to create a new, empty annotation set.", +"doc":"HTML for the annotation set chooser. It is a dropdown with options, each corresponding to an existing annotation set. There is also a control to delete the set. Apart from these buttons there is a button to switch to the entities that are present in the TF dataset as nodes of the entity type specified in the YAML file with corresponding features. Finally, it is possible to create a new, empty annotation set.", "func":1 }, { @@ -4582,7 +4618,7 @@ INDEX=[ { "ref":"tf.browser.ner.ner", "url":103, -"doc":"API for Named Entity marking. As a preparation, read tf.about.annotate first, since it explains the concepts, and guides you to set up the configuration for your corpus. The main task of this module is to find occurrences of annotations on the basis of criteria. But this is just the tip of the iceberg, since this module inherits from a number of other modules that inherit form yet other modules: tf.browser.ner.show : generate HTML for annotated buckets of the corpus; tf.browser.ner.sets : manage annotation sets; tf.browser.ner.data : manage annotation data: loading, adding/deleting annotations; tf.browser.ner.settings : manage the specifics of a TF corpus and have access to its data. It also uses tf.browser.ner.match : to filter individual buckets on the basis of criteria. Hence, Annotation is the central class of this tool, whose methods are relevant for: tf.browser.ner.ner : the API for users to manipulate annotations in their own programs, especially in a Jupyter notebook. tf.browser.ner.web : Flask app that routes URLs to controller functions. web makes use of the following modules that are not needed by ner : tf.browser.ner.serve : define the controllers of the web app Again, this is a top of an iceberg, since it inherits from: tf.browser.ner.request : manage the data of a request; tf.browser.ner.fragments : generate HTML for widgets on the page; request also uses form to retrieve form values into typed and structured values. Both web and ner make use of the following modules in as far as they are not already mentioned under annotate and its parent classes: tf.browser.ner.helpers : a variety of context-free data jugglers; tf.browser.html : a generic library to generate HTML using Pythonic syntax. This module contains the top-level methods for applying annotation rules to a corpus. ! note \"Class hierarchy\" The classes Settings , Corpus , Data , Sets , Show , NER form one hierarchy. So an object of class NER has access to all methods of these classes. The classes Serve , Request , Fragments , From form a separate hierarchy. It will create an NER instance which will be stored in a Serve instance. Here is an overview how the modules hang together. A | denotes inheritance, parent classes above child classes. A <-< arrow denotes dependency by importing code. Browser | Api-hierarchy web < -< Serve < -< NER <-< match | | | | Request Fragments <-< html | Sets Sheets Show <-< html | | | Form | Data | | | Corpus | | | Settings Programmatic annotation done in a Jupyter Notebook If you have a spreadsheet with named entities, and for each entity a list of surface forms, then this module takes care to read that spreadsheet, translate it to YAML, and then use the YAML as instructions to add entity annotations to the corpus. See this [example notebook](https: nbviewer.jupyter.org/github/HuygensING/suriano/blob/main/programs/ner.ipynb). Here are more details. Starting up Load the relevant Python modules: python from tf.app import use Load your corpus. There are two ways: Work with a local GitHub clone of the corpus in ~/HuygensING/suriano : A = use(\"HuygensING/suriano:clone\", checkout=\"clone\") Or let TF auto-download the latest version and work with that: A = use(\"HuygensING/suriano\") Load the Ner module: python NE = A.makeNer() The tool expects some input data to be present: configuration and spreadsheets with instructions. They can be found in the ner directory. If you work with a local GitHub clone, that data resides in ~/github/HuygensING/suriano and if you work with an auto-downloaded copy of the data, it is in ~/text-fabric-data/github/HuygensING/suriano . The output data of the tool ends up in the _temp directory, which ends up next to the ner directory. The entity spreadsheets Here is an example: ![browser]( / /images/Ner/spreadsheet.png) In our example, the name of the spreadsheet containing this information is people.xlsx and it can be found as ner/sheets/people.xlsx The spreadsheet will be read as follows: the first two rows will be skipped after that, each row is taken to describe exactly one entity the first column has the full and unique name for that entity the second column contains the kind of the entity (you may choose your keywords freely for this) the third column contains a number of surface forms for this entity, separated by ; when the surface forms are peeled out, leading and trailing white-space will be stripped all other columns will be ignored for the moment; in later versions we may use the information in those columns to fill in extra data about the entities; but probably that information will not end up in TF features. During translation from XLSX to YAML the following happens: An identifier is distilled from the name of the entity; Missing kind fields are filled with the default kind. These steps need some configuration information from the ner/config.yaml file. Translation is done by python NE.setSheet(\"people\") The resulting YAML ends up next to the spreadsheet, and it looks like this: yaml christoffel.sticke: kind: PER name: Christoffel Sticke occSpecs: [] diederik.sticke: kind: PER name: Diederik Sticke occSpecs: - Dierck - Dirk dirck.hartog: kind: PER name: Dirck Hartog occSpecs: - Dirich Hartocson - Hertocson jan.baptist.roelants: kind: PER name: Jan-Baptist Roelants occSpecs: - Roelans - Rolans Inventory A first step is to find out how many occurrences we find in the corpus for these surface forms: python NE.lookup() NE.showHits() and the output looks like this . cornelis.adriaensz PER Pach 7 x Cornelis Adriaensz. Pack david.marlot PER Morlot 1 x David de Marlot erick.dimmer PER Dimer 11 x Erick Dimmer erycius.puteanus PER Potiano 2 x Erycius Puteanus francesco.giustiniani PER Giustiniano 11 x Francesco Giustiniani francois.doubleth PER Doublet 2 x Fran\u00e7ois Doubleth . Total 150 Entities that are in the spreadsheet, but not in the corpus are skipped. Marking up In order to create annotations for these entities, we have to switch to an annotation set. Let's start a new set and give it the name power . python NE.setSet(\"power\") If it turns out that power has already annotations, and you want to clear them, say python NE.resetSet(\"power\") Now we are ready for the big thing: creating the annotations: python NE.markEntities() It outputs this message: Already present: 0 x Added: 150 x Inspection We now revert to lower-level methods from the tf.browser.ner.ner class to inspect some of the results. python results = NE.filterContent(bFind=\"pach\", bFindC=False, anyEnt=True, showStats=None) Here we filtered the chunks (paragraphs) to those that contain the string pach , in a case-insensitive way, and that contain at least one entity. There 6 of them, and we can show them: python NE.showContent(results) ![browser]( / /images/Ner/pach.png) The resulting entities are in _temp/power/entities.tsv and look like this: erick.dimmer PER 160196 isabella.clara.eugenia PER 142613 gaspar.iii.coligny PER 7877 isabella.clara.eugenia PER 210499 john.vere PER 94659 antonio.lando PER 267755 isabella.clara.eugenia PER 107069 isabella.clara.eugenia PER 9162 michiel.pagani PER 94366 isabella.clara.eugenia PER 179208 isabella.clara.eugenia PER 258933 hans.meinhard PER 75039 . Each line corresponds to a marked entity occurrence. Lines consist of tab separated fields: entity identifier entity kind remaining fields: slots, i.e. the textual positions occupied by the occurrence. Some entity occurrences consist of multiple words / tokens, hence have multiple slots." +"doc":"API for Named Entity marking. As a preparation, read tf.about.annotate first, since it explains the concepts, and guides you to set up the configuration for your corpus. The main task of this module is to find occurrences of annotations on the basis of criteria. But this is just the tip of the iceberg, since this module inherits from a number of other modules that inherit form yet other modules: tf.browser.ner.show : generate HTML for annotated buckets of the corpus; tf.browser.ner.sets : manage annotation sets; tf.browser.ner.data : manage annotation data: loading, adding/deleting annotations; tf.browser.ner.settings : manage the specifics of a TF corpus and have access to its data. It also uses tf.browser.ner.match : to filter individual buckets on the basis of criteria. Hence, Annotation is the central class of this tool, whose methods are relevant for: tf.browser.ner.ner : the API for users to manipulate annotations in their own programs, especially in a Jupyter notebook. tf.browser.ner.web : Flask app that routes URLs to controller functions. web makes use of the following modules that are not needed by ner : tf.browser.ner.serve : define the controllers of the web app Again, this is a top of an iceberg, since it inherits from: tf.browser.ner.request : manage the data of a request; tf.browser.ner.fragments : generate HTML for widgets on the page; request also uses form to retrieve form values into typed and structured values. Both web and ner make use of the following modules in as far as they are not already mentioned under annotate and its parent classes: tf.browser.ner.helpers : a variety of context-free data jugglers; tf.browser.html : a generic library to generate HTML using Pythonic syntax. This module contains the top-level methods for applying annotation rules to a corpus. ! note \"Class hierarchy\" The classes Settings , Corpus , Data , Sets , Show , NER form one hierarchy. So an object of class NER has access to all methods of these classes. The classes Serve , Request , Fragments , From form a separate hierarchy. It will create an NER instance which will be stored in a Serve instance. Here is an overview how the modules hang together. A | denotes inheritance, parent classes above child classes. A <-< arrow denotes dependency by importing code. Browser | Api-hierarchy web < -< Serve < -< NER <-< match | | | | Request Fragments <-< html | Sets Sheets Show <-< html | | | Form | Data | | | Corpus | | | Settings Programmatic annotation done in a Jupyter Notebook If you have a spreadsheet with named entities, and for each entity a list of surface forms, then this module takes care to read that spreadsheet, translate it to YAML, and then use the YAML as instructions to add entity annotations to the corpus. See this [example notebook](https: nbviewer.jupyter.org/github/HuygensING/suriano/blob/main/programs/ner.ipynb). Here are more details. Starting up Load the relevant Python modules: python from tf.app import use Load your corpus. There are two ways: Work with a local GitHub clone of the corpus in ~/HuygensING/suriano : A = use(\"HuygensING/suriano:clone\", checkout=\"clone\") Or let TF auto-download the latest version and work with that: A = use(\"HuygensING/suriano\") Load the Ner module: python NE = A.makeNer() The tool expects some input data to be present: configuration and spreadsheets with instructions. They can be found in the ner directory. If you work with a local GitHub clone, that data resides in ~/github/HuygensING/suriano and if you work with an auto-downloaded copy of the data, it is in ~/text-fabric-data/github/HuygensING/suriano . The output data of the tool ends up in the _temp directory, which ends up next to the ner directory. The entity spreadsheets Here is an example: ![browser]( / /images/Ner/spreadsheet.png) In our example, the name of the spreadsheet containing this information is people.xlsx and it can be found as ner/sheets/people.xlsx The spreadsheet will be read as follows: the first two rows will be skipped after that, each row is taken to describe exactly one entity the first column has the full and unique name for that entity the second column contains the kind of the entity (you may choose your keywords freely for this) the third column contains a number of surface forms for this entity, separated by ; when the surface forms are peeled out, leading and trailing white-space will be stripped all other columns will be ignored for the moment; in later versions we may use the information in those columns to fill in extra data about the entities; but probably that information will not end up in TF features. During translation from XLSX to YAML the following happens: An identifier is distilled from the name of the entity; Missing kind fields are filled with the default kind. These steps need some configuration information from the ner/config.yaml file. Translation is done by python NE.setSheet(\"people\") The resulting YAML ends up next to the spreadsheet, and it looks like this: yaml christoffel.sticke: kind: PER name: Christoffel Sticke occSpecs: [] diederik.sticke: kind: PER name: Diederik Sticke occSpecs: - Dierck - Dirk dirck.hartog: kind: PER name: Dirck Hartog occSpecs: - Dirich Hartocson - Hertocson jan.baptist.roelants: kind: PER name: Jan-Baptist Roelants occSpecs: - Roelans - Rolans Inventory A first step is to find out how many occurrences we find in the corpus for these surface forms: python NE.reportHits() and the output looks like this . cornelis.adriaensz PER Pach 7 x Cornelis Adriaensz. Pack david.marlot PER Morlot 1 x David de Marlot erick.dimmer PER Dimer 11 x Erick Dimmer erycius.puteanus PER Potiano 2 x Erycius Puteanus francesco.giustiniani PER Giustiniano 11 x Francesco Giustiniani francois.doubleth PER Doublet 2 x Fran\u00e7ois Doubleth . Total 150 Entities that are in the spreadsheet, but not in the corpus are skipped. Inspection We now revert to lower-level methods from the tf.browser.ner.ner class to inspect some of the results. python results = NE.filterContent(bFind=\"pach\", bFindC=False, anyEnt=True, showStats=None) Here we filtered the chunks (paragraphs) to those that contain the string pach , in a case-insensitive way, and that contain at least one entity. There 6 of them, and we can show them: python NE.showContent(results) ![browser]( / /images/Ner/pach.png) The resulting entities are in _temp/power/entities.tsv and look like this: erick.dimmer PER 160196 isabella.clara.eugenia PER 142613 gaspar.iii.coligny PER 7877 isabella.clara.eugenia PER 210499 john.vere PER 94659 antonio.lando PER 267755 isabella.clara.eugenia PER 107069 isabella.clara.eugenia PER 9162 michiel.pagani PER 94366 isabella.clara.eugenia PER 179208 isabella.clara.eugenia PER 258933 hans.meinhard PER 75039 . Each line corresponds to a marked entity occurrence. Lines consist of tab separated fields: entity identifier entity kind remaining fields: slots, i.e. the textual positions occupied by the occurrence. Some entity occurrences consist of multiple words / tokens, hence have multiple slots." }, { "ref":"tf.browser.ner.ner.NER", @@ -4614,12 +4650,6 @@ INDEX=[ "func":1 }, { -"ref":"tf.browser.ner.ner.NER.markEntities", -"url":103, -"doc":"Marks up the members of the inventory as entities. The instructions contain the entity identifier and the entity kind that have to be assigned to the surface forms. The inventory knows where the occurrences of the surface forms are. If there is no inventory yet, it will be created.", -"func":1 -}, -{ "ref":"tf.browser.ner.ner.NER.bakeEntities", "url":103, "doc":"Bakes the entities of the current set as nodes into a new TF data source. Parameters versionExtension: string, optional \"e\" The new dataset gets a version like the original dataset, but extended with this string.", @@ -4703,7 +4733,7 @@ INDEX=[ { "ref":"tf.browser.ner.ner.NER.setDup", "url":104, -"doc":"Duplicates the current set to a set with a new name. ! hint \"The special set can be duplicated\" After duplication of the special read-only set, the duplicate copy is modifiable. In this way you can make corrections to the set of pre-existing, tool-generated annotations. The current set changes to the result of the duplication. Parameters dupSet: string The name of new set that is the result of the duplication.", +"doc":"Duplicates the current set to a set with a new name. ! hint \"The readonly sets can be duplicated\" After duplication of a read-only set, the duplicate copy is modifiable. In this way you can make corrections to the set of pre-existing, tool-generated annotations. The current set changes to the result of the duplication. Parameters dupSet: string The name of new set that is the result of the duplication.", "func":1 }, { @@ -4724,11 +4754,6 @@ INDEX=[ "doc":"The current annotation set." }, { -"ref":"tf.browser.ner.ner.NER.setNameRep", -"url":104, -"doc":"The name representation of the current annotation set." -}, -{ "ref":"tf.browser.ner.ner.NER.setNames", "url":104, "doc":"The set of names of annotation sets that are present on the file system." @@ -4772,7 +4797,7 @@ INDEX=[ { "ref":"tf.browser.ner.ner.NER.addEntities", "url":105, -"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. It is used by the method tf.browser.ner.ner.NER.markEntities() . Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", +"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", "func":1 }, { @@ -5029,7 +5054,19 @@ INDEX=[ { "ref":"tf.browser.ner.fragments.Fragments.wrapSets", "url":102, -"doc":"HTML for the annotation set chooser. It is a list of buttons, each corresponding to an existing annotation set. A click on the button selects that set. There is also a control to delete the set. Apart from these buttons there is a button to switch to the entities that are present in the TF dataset as nodes of the entity type specified in the YAML file with corresponding features. Finally, it is possible to create a new, empty annotation set.", +"doc":"HTML for the annotation set chooser. It is a dropdown with options, each corresponding to an existing annotation set. There is also a control to delete the set. Apart from these buttons there is a button to switch to the entities that are present in the TF dataset as nodes of the entity type specified in the YAML file with corresponding features. Finally, it is possible to create a new, empty annotation set.", +"func":1 +}, +{ +"ref":"tf.browser.ner.fragments.Fragments.wrapCaption", +"url":102, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.fragments.Fragments.wrapLogs", +"url":102, +"doc":"", "func":1 }, { @@ -5130,7 +5167,13 @@ INDEX=[ { "ref":"tf.browser.ner.sets.Sets", "url":104, -"doc":"Methods to create, duplicate, rename and delete annotation sets. Annotation sets have names, given by the user. There is one special annotation set, whose name is the empty string, and whose content are the pre-existing entities, i.e. the entities that are present in the TF data as nodes and features. There is always one current annotation set, whose data is loaded into memory. Parameters sets: object, optional None Entity sets to start with. If None, a fresh store of sets will be created by a parent class (Data)." +"doc":"Methods to create, duplicate, rename and delete annotation sets. Annotation sets have names, given by the user. There is a special annotation set, whose name is the empty string, and whose content are the pre-existing entities, i.e. the entities that are present in the TF data as nodes and features. Users can not name sets with names that start with a dot. Annotation sets whose name start with a dot are generated by the system when a family of spreadsheets with entity triggers is processed. These sets are readonly, like the special annotation set, but they can be duplicated to ordinary sets. Those copies loose the relationship with the original spreadsheet. There is always one current annotation set, whose data is loaded into memory. Parameters sets: object, optional None Entity sets to start with. If None, a fresh store of sets will be created by a parent class (Data)." +}, +{ +"ref":"tf.browser.ner.sets.Sets.setInfo", +"url":104, +"doc":"", +"func":1 }, { "ref":"tf.browser.ner.sets.Sets.readSets", @@ -5159,7 +5202,7 @@ INDEX=[ { "ref":"tf.browser.ner.sets.Sets.setDup", "url":104, -"doc":"Duplicates the current set to a set with a new name. ! hint \"The special set can be duplicated\" After duplication of the special read-only set, the duplicate copy is modifiable. In this way you can make corrections to the set of pre-existing, tool-generated annotations. The current set changes to the result of the duplication. Parameters dupSet: string The name of new set that is the result of the duplication.", +"doc":"Duplicates the current set to a set with a new name. ! hint \"The readonly sets can be duplicated\" After duplication of a read-only set, the duplicate copy is modifiable. In this way you can make corrections to the set of pre-existing, tool-generated annotations. The current set changes to the result of the duplication. Parameters dupSet: string The name of new set that is the result of the duplication.", "func":1 }, { @@ -5180,11 +5223,6 @@ INDEX=[ "doc":"The current annotation set." }, { -"ref":"tf.browser.ner.sets.Sets.setNameRep", -"url":104, -"doc":"The name representation of the current annotation set." -}, -{ "ref":"tf.browser.ner.sets.Sets.setNames", "url":104, "doc":"The set of names of annotation sets that are present on the file system." @@ -5228,7 +5266,7 @@ INDEX=[ { "ref":"tf.browser.ner.sets.Sets.addEntities", "url":105, -"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. It is used by the method tf.browser.ner.ner.NER.markEntities() . Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", +"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", "func":1 }, { @@ -5466,7 +5504,13 @@ INDEX=[ "func":1 }, { -"ref":"tf.browser.ner.helpers.log", +"ref":"tf.browser.ner.helpers.consoleLine", +"url":108, +"doc":"", +"func":1 +}, +{ +"ref":"tf.browser.ner.helpers.repSet", "url":108, "doc":"", "func":1 @@ -5520,7 +5564,7 @@ INDEX=[ { "ref":"tf.browser.ner.data.Data.addEntities", "url":105, -"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. It is used by the method tf.browser.ner.ner.NER.markEntities() . Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", +"doc":"Add multiple entities efficiently to the current set. This operation is not allowed if the current set is the read-only set with the empty name. If you have multiple entities to add, it is wasteful to do multiple passes over the corpus to find them. This method does them all in one fell swoop. Parameters newEntites: iterable of tuples of tuples each new entity consists of a tuple of entity feature values, specifying the entity to add a list of slot tuples, specifying where to add this entity silent: boolean, optional False Reports how many entities have been added and how many were already present in the specified locations. Returns - (int, int) or void If silent , it returns the number of already existing entities that were asked to be deleted and the number of actually deleted entities. If the operation is not allowed, both integers above are set to -1.", "func":1 }, { @@ -5787,12 +5831,6 @@ INDEX=[ "func":1 }, { -"ref":"tf.browser.ner.match.occMatchOld", -"url":109, -"doc":"Finds the occurrences of multiple sequences of tokens in a single bucket. Parameters getTokens: function See tf.browser.ner.corpus.Corpus.getTokens b: integer The node of the bucket in question qSeqs: set, optional set() A set of sequences of tokens. Each sequence in the set will be used as a search pattern, and it occurrences in the bucket are collected. result: dict A dictionary to collect the results in. Keyed by each member of parameter qSeqs the values are the occurrences of that member in the corpus. A single occurrence is represented as a tuple of slots.", -"func":1 -}, -{ "ref":"tf.browser.ner.match.entityMatch", "url":109, "doc":"Checks whether a bucket satisfies a variety of criteria. When we do the checking, we ignore empty tokens in the bucket. Parameters entityIndex, eStarts, entitySlotVal, entitySlotAll, entitySlotIndex: object Various kinds of processed entity data, see tf.browser.ner.data getTextR: function See tf.browser.ner.corpus.Corpus.getTextR getTokens: function See tf.browser.ner.corpus.Corpus.getTokens b: integer The node of the bucket in question bFindRe, anyEnt, eVals, qTokens, valSelect, freeState: object As in tf.browser.ner.ner.NER.filterContent Returns - tuple Members: fits : boolean, whether the bucket passes the filter (tokens, matches, positions) : tokens all tokens of the bucket, each token is a tuple consisting of its slot number (position) and string value; matches : a list of the positions of the found occurrences for the qTokens and / or eVals in the bucket; positions : a set of positions in the bucket where the bFindRe starts to match;", @@ -6266,7 +6304,7 @@ INDEX=[ { "ref":"tf.cheatsheet", "url":117, -"doc":" A. Advanced API Initialization, configuration, meta data, and linking python A = use('org/repo') : start up and load a corpus from a repository and deliver its API. : See tf.about.usefunc python A.hoist(globals( : Make the API handles F , E , T , L etc available in the global scope. : tf.advanced.app.App.load python A.load(features) : Load an extra bunch of features. : tf.advanced.app.App.load python A.showContext( .) : show app settings : tf.advanced.settings.showContext python A.header(allMeta=False) : show colophon : tf.advanced.links.header python A.showProvenance( .) : show provenance of code and data : tf.advanced.links.showProvenance python A.webLink(n, .) : hyperlink to node n on the web : tf.advanced.links.webLink python A.flexLink(\"pages\") A.flexLink(\"tut\") : hyperlink to app tutorial and documentation : tf.advanced.links.flexLink python A.isLoaded(features=None) : Show information about loaded features : tf.core.api.Api.isLoaded python A.footprint() : Show memory footprint per feature : tf.core.api.Api.footprint - Displaying python A.specialCharacters() : show all hard-to-type characters in the corpus in a widget : tf.advanced.text.specialCharacters python A.showFormats() : show all text formats and their definitions : tf.advanced.text.showFormats python A.dm(markdownString) : display markdown string in notebook : tf.advanced.helpers.dm python A.dh(htmlString) : display HTML string in notebook : tf.advanced.helpers.dh python A.method(option1=value1, option2=value2, .) : Many of the following methods accept these options as keyword arguments: : tf.advanced.options python A.displayShow( .) : show display options : tf.advanced.display.displayShow python A.displayReset( .) : reset display options : tf.advanced.display.displayReset python A.displaySetup( .) : set up display options : tf.advanced.display.displaySetup python A.table(results, .) : plain rendering of tuple of tuples of node : tf.advanced.display.table python A.plainTuple(tup, .) : plain rendering of tuple of node : tf.advanced.display.plainTuple python A.plain(node, .) : plain rendering of node : tf.advanced.display.plain python A.show(results, .) : pretty rendering of tuple of tuples of node : tf.advanced.display.show python A.prettyTuple(tup, .) : pretty rendering of tuple of node : tf.advanced.display.prettyTuple python A.pretty(node, .) : pretty rendering of node : tf.advanced.display.pretty python A.unravel(node, .) : convert a graph to a tree : tf.advanced.unravel.unravel python A.getCss() : get the complete CSS style sheet for this app : tf.advanced.display.getCss - Search (high level) python A.search( .) : search, collect and deliver results, report number of results : tf.advanced.search.search - Sections and Structure python A.nodeFromSectionStr( .) : lookup node for section heading : tf.advanced.sections.nodeFromSectionStr python A.sectionStrFromNode( .) : lookup section heading for node : tf.advanced.sections.sectionStrFromNode python A.structureStrFromNode( .) : lookup structure heading for node : tf.advanced.sections.structureStrFromNode - Volumes and collections See also tf.about.volumes . python A.getVolumes() : list all volumes of this dataset : tf.fabric.Fabric.getVolumes python A.extract(volumes, .) : export volumes based on a volume specification : tf.fabric.Fabric.extract python A.collect(volumes, .) : collect several volumes into a new collection : tf.advanced.display.export : tf.fabric.Fabric.collect - Export to Excel python A.export(results, .) : export formatted data : tf.advanced.display.export - Logging python A.dm(markdownString) : display markdown string in notebook : tf.advanced.helpers.dm python A.dh(htmlString) : display HTML string in notebook : tf.advanced.helpers.dh python A.version : version number of data of the corpus. : tf.fabric.Fabric.version The following methods work also for TF. instead of A. : python A.banner : banner of the TF program. : tf.fabric.Fabric.banner python A.isSilent() : report the verbosity of TF : tf.core.timestamp.Timestamp.isSilent python A.silentOn(deep=False) : make TF (deeply) silent from now on. : tf.core.timestamp.Timestamp.silentOn python A.silentOff() : make TF talkative from now on. : tf.core.timestamp.Timestamp.silentOff python A.setSilent(silent) : set the verbosity of TF. : tf.core.timestamp.Timestamp.setSilent python A.indent(level=None, reset=False) : Sets up indentation and timing of following messages : tf.core.timestamp.Timestamp.indent python A.info(msg, tm=True, nl=True, .) : informational message : tf.core.timestamp.Timestamp.info python A.warning(msg, tm=True, nl=True, .) : warning message : tf.core.timestamp.Timestamp.warning python A.error(msg, tm=True, nl=True, .) : error message : tf.core.timestamp.Timestamp.error - N. F. E. L. T. S. C. Core API N. Nodes Read about the canonical ordering here: tf.core.nodes . python N.walk() : generator of all nodes in canonical ordering : tf.core.nodes.Nodes.walk python N.sortNodes(nodes) : sorts nodes in the canonical ordering : tf.core.nodes.Nodes.sortNodes python N.otypeRank[nodeType] : ranking position of nodeType : tf.core.nodes.Nodes.otypeRank python N.sortKey(node) : defines the canonical ordering on nodes : tf.core.nodes.Nodes.sortKey python N.sortKeyTuple(tup) : extends the canonical ordering on nodes to tuples of nodes : tf.core.nodes.Nodes.sortKeyTuple python N.sortKeyChunk(node) : defines the canonical ordering on node chunks : tf.core.nodes.Nodes.sortKeyChunk - F. Node features python Fall() : all loaded feature names (node features only) : tf.core.api.Api.Fall python F.fff.v(node) : get value of node feature fff : tf.core.nodefeature.NodeFeature.v python F.fff.s(value) : get nodes where feature fff has value : tf.core.nodefeature.NodeFeature.s python F.fff.freqList( .) : frequency list of values of fff : tf.core.nodefeature.NodeFeature.freqList python F.fff.items( .) : generator of all entries of fff as mapping from nodes to values : tf.core.nodefeature.NodeFeature.items python F.fff.meta : meta data of feature fff : tf.core.nodefeature.NodeFeature.meta python Fs('fff') : identical to F.ffff , usable if name of feature is variable : tf.core.api.Api.Fs - Special node feature otype Maps nodes to their types. python F.otype.v(node) : get type of node : tf.core.otypefeature.OtypeFeature.v python F.otype.s(nodeType) : get all nodes of type nodeType : tf.core.otypefeature.OtypeFeature.s python F.otype.sInterval(nodeType) : gives start and ending nodes of nodeType : tf.core.otypefeature.OtypeFeature.sInterval python F.otype.items( .) : generator of all (node, type) pairs. : tf.core.otypefeature.OtypeFeature.items python F.otype.meta : meta data of feature otype : tf.core.otypefeature.OtypeFeature.meta python F.otype.maxSlot : the last slot node : tf.core.otypefeature.OtypeFeature.maxSlot python F.otype.maxNode : the last node : tf.core.otypefeature.OtypeFeature.maxNode python F.otype.slotType : the slot type : tf.core.otypefeature.OtypeFeature.slotType python F.otype.all : sorted list of all node types : tf.core.otypefeature.OtypeFeature.all - E. Edge features python Eall() : all loaded feature names (edge features only) : tf.core.api.Api.Eall python E.fff.f(node) : get value of feature fff for edges from node : tf.core.edgefeature.EdgeFeature.f python E.fff.t(node) : get value of feature fff for edges to node : tf.core.edgefeature.EdgeFeature.t python E.fff.freqList( .) : frequency list of values of fff : tf.core.edgefeature.EdgeFeature.freqList python E.fff.items( .) : generator of all entries of fff as mapping from edges to values : tf.core.edgefeature.EdgeFeature.items python E.fff.b(node) : get value of feature fff for edges from and to node : tf.core.edgefeature.EdgeFeature.b python E.fff.meta : all meta data of feature fff : tf.core.edgefeature.EdgeFeature.meta python Es('fff') : identical to E.fff , usable if name of feature is variable : tf.core.api.Api.Es - Special edge feature oslots Maps nodes to the set of slots they occupy. python E.oslots.items( .) : generator of all entries of oslots as mapping from nodes to sets of slots : tf.core.oslotsfeature.OslotsFeature.items python E.oslots.s(node) : set of slots linked to node : tf.core.oslotsfeature.OslotsFeature.s python E.oslots.meta : all meta data of feature oslots : tf.core.oslotsfeature.OslotsFeature.meta - L. Locality python L.i(node, otype= .) : go to intersecting nodes : tf.core.locality.Locality.i python L.u(node, otype= .) : go one level up : tf.core.locality.Locality.u python L.d(node, otype= .) : go one level down : tf.core.locality.Locality.d python L.p(node, otype= .) : go to adjacent previous nodes : tf.core.locality.Locality.p python L.n(node, otype= .) : go to adjacent next nodes : tf.core.locality.Locality.n - T. Text python T.text(node, fmt= ., .) : give formatted text associated with node : tf.core.text.Text.text - Sections Rigid 1 or 2 or 3 sectioning system python T.sectionTuple(node) : give tuple of section nodes that contain node : tf.core.text.Text.sectionTuple python T.sectionFromNode(node) : give section heading of node : tf.core.text.Text.sectionFromNode python T.nodeFromSection(section) : give node for section heading : tf.core.text.Text.nodeFromSection - Structure Flexible multilevel sectioning system python T.headingFromNode(node) : give structure heading of node : tf.core.text.Text.headingFromNode python T.nodeFromHeading(heading) : give node for structure heading : tf.core.text.Text.nodeFromHeading python T.structureInfo() : give summary of dataset structure : tf.core.text.Text.structureInfo python T.structure(node) : give structure of node and all in it. : tf.core.text.Text.structure python T.structurePretty(node) : pretty print structure of node and all in it. : tf.core.text.Text.structurePretty python T.top() : give all top-level structural nodes in the dataset : tf.core.text.Text.top python T.up(node) : gives parent of structural node : tf.core.text.Text.up python T.down(node) : gives children of structural node : tf.core.text.Text.down - S. Search (low level) [ searchRough ](https: nbviewer.jupyter.org/github/ETCBC/bhsa/blob/master/tutorial/searchRough.ipynb) Preparation python S.search(query, limit=None) : Query the TF dataset with a template : tf.search.search.Search.search python S.study(query, .) : Study the query in order to set up a plan : tf.search.search.Search.study python S.showPlan(details=False) : Show the search plan resulting from the last study. : tf.search.search.Search.showPlan python S.relationsLegend() : Catalog of all relational devices in search templates : tf.search.search.Search.relationsLegend - Fetching results python S.count(progress=None, limit=None) : Count the results, up to a limit : tf.search.search.Search.count python S.fetch(limit=None, .) : Fetches the results, up to a limit : tf.search.search.Search.fetch python S.glean(tup) : Renders a single result into something human readable. : tf.search.search.Search.glean - Implementation python S.tweakPerformance( .) : Set certain parameters that influence the performance of search. : tf.search.search.Search.tweakPerformance - C. Computed data components. Access to pre-computed data: tf.core.computed.Computeds . All components have just one useful attribute: .data . python Call() : all pre-computed data component names : tf.core.api.Api.Call python Cs('ccc') : identical to C.ccc , usable if name of component is variable : tf.core.api.Api.Cs python C.levels.data : various statistics on node types : tf.core.prepare.levels python C.order.data : the canonical order of the nodes ( tf.core.nodes ) : tf.core.prepare.order python C.rank.data : the rank of the nodes in the canonical order ( tf.core.nodes ) : tf.core.prepare.rank python C.levUp.data : feeds the tf.core.locality.Locality.u function : tf.core.prepare.levUp python C.levDown.data : feeds the tf.core.locality.Locality.d function : tf.core.prepare.levDown python C.boundary.data : feeds the tf.core.locality.Locality.p and tf.core.locality.Locality.n functions : tf.core.prepare.boundary python C.characters.data : frequency list of characters in a corpus, separately for all the text formats : tf.core.prepare.characters python C.sections.data : feeds the section part of tf.core.text : tf.core.prepare.sections python C.structure.data : feeds the structure part of tf.core.text : tf.core.prepare.structure - TF. Dataset Loading python TF = Fabric(locations=dirs, modules=subdirs, volume=None, collection=None, silent=\"auto\") : Initialize API on work or single volume or collection of a work from explicit directories. Use tf.app.use instead wherever you can. See also tf.about.volumes . : tf.fabric.Fabric python TF.isLoaded(features=None) : Show information about loaded features : tf.core.api.Api.isLoaded python TF.explore(show=True) : Get features by category, loaded or unloaded : tf.fabric.Fabric.explore python TF.loadAll(silent=\"auto\") : Load all loadable features. : tf.fabric.Fabric.loadAll python TF.load(features, add=False) : Load a bunch of features from scratch or additionally. : tf.fabric.Fabric.load python TF.ensureLoaded(features) : Make sure that features are loaded. : tf.core.api.Api.ensureLoaded python TF.makeAvailableIn(globals( : Make the members of the core API available in the global scope : tf.core.api.Api.makeAvailableIn python TF.ignored : Which features have been overridden. : tf.core.api.Api.ignored python TF.footprint() : Show memory footprint per feature : tf.core.api.Api.footprint - Volumes See also tf.about.volumes . python TF.getVolumes() : list all volumes of this dataset : tf.fabric.Fabric.getVolumes python TF.extract(volumes, .) : export volumes based on a volume specification : tf.fabric.Fabric.extract python TF.collect(volumes, .) : collect several volumes into a new collection : tf.advanced.display.export : tf.fabric.Fabric.collect Saving and Publishing python TF.save(nodeFeatures={}, edgeFeatures={}, metaData={} .) : Save a bunch of newly generated features to disk. : tf.fabric.Fabric.save python A.publishRelease(increase, message=None, description=None .) : Commit the dataset repo, tag it, release it, and attach the complete zipped data to it. : tf.advanced.repo.publishRelease - House keeping python TF.version : version number of TF. : tf.fabric.Fabric.version python TF.clearCache() : clears the cache of compiled TF data : tf.fabric.Fabric.clearCache python from tf.clean import clean python clean() : clears the cache of compiled TF data : tf.clean - Volume support TF datasets per volume or collection of a work. See also tf.about.volumes . python from tf.volumes import getVolumes getVolumes(volumeDir) : List volumes in a directory. : tf.volumes.extract.getVolumes python from tf.volumes import extract extract(work, volumes, .) : Extracts volumes from a work : tf.volumes.extract python from tf.volumes import collect collect(volumes, work, .) : Collects several volumes into a new collection : tf.volumes.collect - Dataset Operations python from tf.dataset import modify modify(source, target, .) : Modifies a TF dataset into a new TF dataset : tf.dataset.modify python from tf.dataset import Versions Versions(api, va, vb, slotMap) : Extends a slot mapping between versions of a TF dataset to a complete node mapping : tf.dataset.nodemaps - Data Interchange Custom node sets for search python from tf.lib import readSets from tf.lib import writeSets python readSets(sourceFile) : reads a named sets from file : tf.lib.readSets python writeSets(sets, destFile) : writes a named sets to file : tf.lib.writeSets - Export to Excel python A.export(results, .) : export formatted data : tf.advanced.display.export - Export to ZIP python A.zipAll() : store the complete corpus data in a file complete.zip : tf.advanced.zipdata.zipAll - Interchange with external annotation tools python from tf.convert.addnlp import NLPipeline python NLPipeline() : generate plain text, feed into NLP, ingest results : tf.convert.addnlp - python from convert.recorder import Recorder python Recorder() : generate annotatable plain text and import annotations : tf.convert.recorder - XML / TEI import python from tf.convert.xml import XML python X = XML( .) : convert XML source to full-fledged TF dataset plus app but no docs; put in your own conversion code, if you wish; see [Greek New Testament](https: nbviewer.org/github/ETCBC/nestle1904/blob/master/programs/tfFromLowfat.ipynb) : tf.convert.xml python from tf.convert.tei import TEI python T = TEI( .) : convert TEI source to full-fledged TF dataset plus app plus docs : tf.convert.tei - WATM export python from tf.app import use from tf.convert.watm import WATM python A = use( .) WA = WATM(A, ns, .) WA.makeText() WA.makeAnno() WA.writeAll() WA.testAll() : convert TF dataset to text tokens and annotations in JSON format, for consumption by TextRepo/AnnoRepo of [KNAW/HuC Digital Infrastructure](https: di.huc.knaw.nl/text-analysis-en.html). See [Mondriaan Proeftuin](https: github.com/annotation/mondriaan) [Suriano Letters](https: gitlab.huc.knaw.nl/suriano/letters) [TransLatin Corpus](https: gitlab.huc.knaw.nl/translatin/corpus) : tf.convert.watm python from tf.convert.watm import WATMS python W = WATM(org, repo, backend, ns, .) W.produce() : convert series of TF datasets to WATM : tf.convert.watm.WATMS - NLP import in order to use this, install Spacy, see tf.tools.myspacy python from tf.convert.addnlp import addTokensAndSentences python newVersion = addTokensAndSenteces(A) : add NLP output from Spacy to an existing TF dataset. See the docs how this is broken down in separate steps. : tf.convert.addnlp - pandas export python A.exportPandas() : export dataset as pandas data frame : tf.convert.pandas - MQL interchange python TF.exportMQL(mqlDb, exportDir=None) A.exportMQL(mqlDb, exportDir=None) : export loaded dataset to MQL : tf.convert.mql.exportMQL python from tf.convert.mql import importMQL TF = importMQL(mqlFile, saveDir) : convert MQL file to TF dataset : tf.convert.mql.importMQL - Walker conversion python from tf.convert.walker import CV python cv = CV(TF) : convert structured data to TF dataset : tf.convert.walker - Exploding python from tf.convert.tf import explode python explode(inLocation, outLocation) : explode TF feature files to straight data files without optimizations : tf.convert.tf.explode - TF App development python A.reuse() : reload configuration data : tf.advanced.app.App.reuse python from tf.advanced.find import loadModule python mmm = loadModule(\"mmm\", args) : load specific module supporting the corpus app : tf.advanced.find.loadModule ~/mypath/myname/app/config.yaml : settings for a TF App : tf.advanced.settings - Layered search (these work on the command-line if TF is installed) sh tf-make {dataset} {client} ship : generate a static site with a search interface in client-side JavaScript and publish it to GitHub pages. If {client} is left out, generate all clients that are defined for this dataset. Clients are defined in the app-{dataset} repo, under layeredsearch . More commands [here](https: github.com/annotation/text-fabric/blob/master/tf/client/make/help.py). : tf.client.make.build sh tf-make {dataset} serve : serve the search interfaces defined for {dataset} locally. More commands [here](https: github.com/annotation/text-fabric/blob/master/tf/client/make/help.py). - Annotation tools (these work in the TF browser and in Jupyter Notebooks) Named Entity Annotation sh tf {org}/{repo} tool=ner : Starts the TF browser for the corpus in org / repo and opens the manual annotation tool. : tf.about.annotateBrowser python NE = A.makeNer() : Sets up the 'manual' annotation API for the corpus in A . : tf.browser.ner.ner : More info and examples in tf.about.annotate . - Command-line tools (these work on the command-line if TF is installed) sh tf {org}/{repo} tf {org}/{repo} : Starts the TF browser for the corpus in org / repo . : tf.browser.start sh tf-zipall : Zips the TF dataset located by the current directory, with all its additional data modules , but only the latest version , so that it can be attached to a release on GitHub / GitLab. : tf.advanced.zipdata.zipAll and tf.zip sh tf-zip {org}/{repo} : Zips the TF dataset in org / repo so that it can be attached to a release on GitHub / GitLab. : tf.advanced.zipdata sh tf-nbconvert {inDirectory} {outDirectory} : Converts notebooks in inDirectory to HTML and stores them in outDirectory . : tf.tools.nbconvert sh tf-xmlschema analysis {schema}.xsd : Analyses an XML schema file and extracts meaningful information for processing the XML that adheres to that schema. : tf.tools.xmlschema sh tf-fromxml : When run in a repo it finds an XML source and converts it to TF. The resulting TF data is delivered in the repo. There is a hook to put your own conversion code in. : tf.convert.xml sh tf-fromtei : When run in a repo it finds a TEI source and converts it to TF. The resulting TF data is delivered in the repo. : tf.convert.tei sh tf-addnlp : When run in the repo of a TF dataset, it adds NLP output to it after running Spacy to get them. : tf.convert.addnlp " +"doc":" A. Advanced API Initialization, configuration, meta data, and linking python A = use('org/repo') : start up and load a corpus from a repository and deliver its API. : See tf.about.usefunc python A.hoist(globals( : Make the API handles F , E , T , L etc available in the global scope. : tf.advanced.app.App.load python A.load(features) : Load an extra bunch of features. : tf.advanced.app.App.load python A.featureTypes(show=True) : show for which types each feature is defined : tf.advanced.app.App.featureTypes python A.showContext( .) : show app settings : tf.advanced.settings.showContext python A.header(allMeta=False) : show colophon : tf.advanced.links.header python A.showProvenance( .) : show provenance of code and data : tf.advanced.links.showProvenance python A.webLink(n, .) : hyperlink to node n on the web : tf.advanced.links.webLink python A.flexLink(\"pages\") A.flexLink(\"tut\") : hyperlink to app tutorial and documentation : tf.advanced.links.flexLink python A.isLoaded(features=None) : Show information about loaded features : tf.core.api.Api.isLoaded python A.footprint() : Show memory footprint per feature : tf.core.api.Api.footprint - Displaying python A.specialCharacters() : show all hard-to-type characters in the corpus in a widget : tf.advanced.text.specialCharacters python A.showFormats() : show all text formats and their definitions : tf.advanced.text.showFormats python A.dm(markdownString) : display markdown string in notebook : tf.advanced.helpers.dm python A.dh(htmlString) : display HTML string in notebook : tf.advanced.helpers.dh python A.method(option1=value1, option2=value2, .) : Many of the following methods accept these options as keyword arguments: : tf.advanced.options python A.displayShow( .) : show display options : tf.advanced.display.displayShow python A.displayReset( .) : reset display options : tf.advanced.display.displayReset python A.displaySetup( .) : set up display options : tf.advanced.display.displaySetup python A.table(results, .) : plain rendering of tuple of tuples of node : tf.advanced.display.table python A.plainTuple(tup, .) : plain rendering of tuple of node : tf.advanced.display.plainTuple python A.plain(node, .) : plain rendering of node : tf.advanced.display.plain python A.show(results, .) : pretty rendering of tuple of tuples of node : tf.advanced.display.show python A.prettyTuple(tup, .) : pretty rendering of tuple of node : tf.advanced.display.prettyTuple python A.pretty(node, .) : pretty rendering of node : tf.advanced.display.pretty python A.unravel(node, .) : convert a graph to a tree : tf.advanced.unravel.unravel python A.getCss() : get the complete CSS style sheet for this app : tf.advanced.display.getCss - Search (high level) python A.search( .) : search, collect and deliver results, report number of results : tf.advanced.search.search - Sections and Structure python A.nodeFromSectionStr( .) : lookup node for section heading : tf.advanced.sections.nodeFromSectionStr python A.sectionStrFromNode( .) : lookup section heading for node : tf.advanced.sections.sectionStrFromNode python A.structureStrFromNode( .) : lookup structure heading for node : tf.advanced.sections.structureStrFromNode - Volumes and collections See also tf.about.volumes . python A.getVolumes() : list all volumes of this dataset : tf.fabric.Fabric.getVolumes python A.extract(volumes, .) : export volumes based on a volume specification : tf.fabric.Fabric.extract python A.collect(volumes, .) : collect several volumes into a new collection : tf.advanced.display.export : tf.fabric.Fabric.collect - Export to Excel python A.export(results, .) : export formatted data : tf.advanced.display.export - Logging python A.dm(markdownString) : display markdown string in notebook : tf.advanced.helpers.dm python A.dh(htmlString) : display HTML string in notebook : tf.advanced.helpers.dh python A.version : version number of data of the corpus. : tf.fabric.Fabric.version The following methods work also for TF. instead of A. : python A.banner : banner of the TF program. : tf.fabric.Fabric.banner python A.isSilent() : report the verbosity of TF : tf.core.timestamp.Timestamp.isSilent python A.silentOn(deep=False) : make TF (deeply) silent from now on. : tf.core.timestamp.Timestamp.silentOn python A.silentOff() : make TF talkative from now on. : tf.core.timestamp.Timestamp.silentOff python A.setSilent(silent) : set the verbosity of TF. : tf.core.timestamp.Timestamp.setSilent python A.indent(level=None, reset=False) : Sets up indentation and timing of following messages : tf.core.timestamp.Timestamp.indent python A.info(msg, tm=True, nl=True, .) : informational message : tf.core.timestamp.Timestamp.info python A.warning(msg, tm=True, nl=True, .) : warning message : tf.core.timestamp.Timestamp.warning python A.error(msg, tm=True, nl=True, .) : error message : tf.core.timestamp.Timestamp.error - N. F. E. L. T. S. C. Core API N. Nodes Read about the canonical ordering here: tf.core.nodes . python N.walk() : generator of all nodes in canonical ordering : tf.core.nodes.Nodes.walk python N.sortNodes(nodes) : sorts nodes in the canonical ordering : tf.core.nodes.Nodes.sortNodes python N.otypeRank[nodeType] : ranking position of nodeType : tf.core.nodes.Nodes.otypeRank python N.sortKey(node) : defines the canonical ordering on nodes : tf.core.nodes.Nodes.sortKey python N.sortKeyTuple(tup) : extends the canonical ordering on nodes to tuples of nodes : tf.core.nodes.Nodes.sortKeyTuple python N.sortKeyChunk(node) : defines the canonical ordering on node chunks : tf.core.nodes.Nodes.sortKeyChunk - F. Node features python Fall() : all loaded feature names (node features only) : tf.core.api.Api.Fall python F.fff.v(node) : get value of node feature fff : tf.core.nodefeature.NodeFeature.v python F.fff.s(value) : get nodes where feature fff has value : tf.core.nodefeature.NodeFeature.s python F.fff.freqList( .) : frequency list of values of fff : tf.core.nodefeature.NodeFeature.freqList python F.fff.items( .) : generator of all entries of fff as mapping from nodes to values : tf.core.nodefeature.NodeFeature.items python F.fff.meta : meta data of feature fff : tf.core.nodefeature.NodeFeature.meta python Fs('fff') : identical to F.ffff , usable if name of feature is variable : tf.core.api.Api.Fs - Special node feature otype Maps nodes to their types. python F.otype.v(node) : get type of node : tf.core.otypefeature.OtypeFeature.v python F.otype.s(nodeType) : get all nodes of type nodeType : tf.core.otypefeature.OtypeFeature.s python F.otype.sInterval(nodeType) : gives start and ending nodes of nodeType : tf.core.otypefeature.OtypeFeature.sInterval python F.otype.items( .) : generator of all (node, type) pairs. : tf.core.otypefeature.OtypeFeature.items python F.otype.meta : meta data of feature otype : tf.core.otypefeature.OtypeFeature.meta python F.otype.maxSlot : the last slot node : tf.core.otypefeature.OtypeFeature.maxSlot python F.otype.maxNode : the last node : tf.core.otypefeature.OtypeFeature.maxNode python F.otype.slotType : the slot type : tf.core.otypefeature.OtypeFeature.slotType python F.otype.all : sorted list of all node types : tf.core.otypefeature.OtypeFeature.all - E. Edge features python Eall() : all loaded feature names (edge features only) : tf.core.api.Api.Eall python E.fff.f(node) : get value of feature fff for edges from node : tf.core.edgefeature.EdgeFeature.f python E.fff.t(node) : get value of feature fff for edges to node : tf.core.edgefeature.EdgeFeature.t python E.fff.freqList( .) : frequency list of values of fff : tf.core.edgefeature.EdgeFeature.freqList python E.fff.items( .) : generator of all entries of fff as mapping from edges to values : tf.core.edgefeature.EdgeFeature.items python E.fff.b(node) : get value of feature fff for edges from and to node : tf.core.edgefeature.EdgeFeature.b python E.fff.meta : all meta data of feature fff : tf.core.edgefeature.EdgeFeature.meta python Es('fff') : identical to E.fff , usable if name of feature is variable : tf.core.api.Api.Es - Special edge feature oslots Maps nodes to the set of slots they occupy. python E.oslots.items( .) : generator of all entries of oslots as mapping from nodes to sets of slots : tf.core.oslotsfeature.OslotsFeature.items python E.oslots.s(node) : set of slots linked to node : tf.core.oslotsfeature.OslotsFeature.s python E.oslots.meta : all meta data of feature oslots : tf.core.oslotsfeature.OslotsFeature.meta - L. Locality python L.i(node, otype= .) : go to intersecting nodes : tf.core.locality.Locality.i python L.u(node, otype= .) : go one level up : tf.core.locality.Locality.u python L.d(node, otype= .) : go one level down : tf.core.locality.Locality.d python L.p(node, otype= .) : go to adjacent previous nodes : tf.core.locality.Locality.p python L.n(node, otype= .) : go to adjacent next nodes : tf.core.locality.Locality.n - T. Text python T.text(node, fmt= ., .) : give formatted text associated with node : tf.core.text.Text.text - Sections Rigid 1 or 2 or 3 sectioning system python T.sectionTuple(node) : give tuple of section nodes that contain node : tf.core.text.Text.sectionTuple python T.sectionFromNode(node) : give section heading of node : tf.core.text.Text.sectionFromNode python T.nodeFromSection(section) : give node for section heading : tf.core.text.Text.nodeFromSection - Structure Flexible multilevel sectioning system python T.headingFromNode(node) : give structure heading of node : tf.core.text.Text.headingFromNode python T.nodeFromHeading(heading) : give node for structure heading : tf.core.text.Text.nodeFromHeading python T.structureInfo() : give summary of dataset structure : tf.core.text.Text.structureInfo python T.structure(node) : give structure of node and all in it. : tf.core.text.Text.structure python T.structurePretty(node) : pretty print structure of node and all in it. : tf.core.text.Text.structurePretty python T.top() : give all top-level structural nodes in the dataset : tf.core.text.Text.top python T.up(node) : gives parent of structural node : tf.core.text.Text.up python T.down(node) : gives children of structural node : tf.core.text.Text.down - S. Search (low level) [ searchRough ](https: nbviewer.jupyter.org/github/ETCBC/bhsa/blob/master/tutorial/searchRough.ipynb) Preparation python S.search(query, limit=None) : Query the TF dataset with a template : tf.search.search.Search.search python S.study(query, .) : Study the query in order to set up a plan : tf.search.search.Search.study python S.showPlan(details=False) : Show the search plan resulting from the last study. : tf.search.search.Search.showPlan python S.relationsLegend() : Catalog of all relational devices in search templates : tf.search.search.Search.relationsLegend - Fetching results python S.count(progress=None, limit=None) : Count the results, up to a limit : tf.search.search.Search.count python S.fetch(limit=None, .) : Fetches the results, up to a limit : tf.search.search.Search.fetch python S.glean(tup) : Renders a single result into something human readable. : tf.search.search.Search.glean - Implementation python S.tweakPerformance( .) : Set certain parameters that influence the performance of search. : tf.search.search.Search.tweakPerformance - C. Computed data components. Access to pre-computed data: tf.core.computed.Computeds . All components have just one useful attribute: .data . python Call() : all pre-computed data component names : tf.core.api.Api.Call python Cs('ccc') : identical to C.ccc , usable if name of component is variable : tf.core.api.Api.Cs python C.levels.data : various statistics on node types : tf.core.prepare.levels python C.order.data : the canonical order of the nodes ( tf.core.nodes ) : tf.core.prepare.order python C.rank.data : the rank of the nodes in the canonical order ( tf.core.nodes ) : tf.core.prepare.rank python C.levUp.data : feeds the tf.core.locality.Locality.u function : tf.core.prepare.levUp python C.levDown.data : feeds the tf.core.locality.Locality.d function : tf.core.prepare.levDown python C.boundary.data : feeds the tf.core.locality.Locality.p and tf.core.locality.Locality.n functions : tf.core.prepare.boundary python C.characters.data : frequency list of characters in a corpus, separately for all the text formats : tf.core.prepare.characters python C.sections.data : feeds the section part of tf.core.text : tf.core.prepare.sections python C.structure.data : feeds the structure part of tf.core.text : tf.core.prepare.structure - TF. Dataset Loading python TF = Fabric(locations=dirs, modules=subdirs, volume=None, collection=None, silent=\"auto\") : Initialize API on work or single volume or collection of a work from explicit directories. Use tf.app.use instead wherever you can. See also tf.about.volumes . : tf.fabric.Fabric python TF.isLoaded(features=None) : Show information about loaded features : tf.core.api.Api.isLoaded python TF.explore(show=True) : Get features by category, loaded or unloaded : tf.fabric.Fabric.explore python TF.loadAll(silent=\"auto\") : Load all loadable features. : tf.fabric.Fabric.loadAll python TF.load(features, add=False) : Load a bunch of features from scratch or additionally. : tf.fabric.Fabric.load python TF.ensureLoaded(features) : Make sure that features are loaded. : tf.core.api.Api.ensureLoaded python TF.makeAvailableIn(globals( : Make the members of the core API available in the global scope : tf.core.api.Api.makeAvailableIn python TF.ignored : Which features have been overridden. : tf.core.api.Api.ignored python TF.footprint() : Show memory footprint per feature : tf.core.api.Api.footprint - Volumes See also tf.about.volumes . python TF.getVolumes() : list all volumes of this dataset : tf.fabric.Fabric.getVolumes python TF.extract(volumes, .) : export volumes based on a volume specification : tf.fabric.Fabric.extract python TF.collect(volumes, .) : collect several volumes into a new collection : tf.advanced.display.export : tf.fabric.Fabric.collect Saving and Publishing python TF.save(nodeFeatures={}, edgeFeatures={}, metaData={} .) : Save a bunch of newly generated features to disk. : tf.fabric.Fabric.save python A.publishRelease(increase, message=None, description=None .) : Commit the dataset repo, tag it, release it, and attach the complete zipped data to it. : tf.advanced.repo.publishRelease - House keeping python TF.version : version number of TF. : tf.fabric.Fabric.version python TF.clearCache() : clears the cache of compiled TF data : tf.fabric.Fabric.clearCache python from tf.clean import clean python clean() : clears the cache of compiled TF data : tf.clean - Volume support TF datasets per volume or collection of a work. See also tf.about.volumes . python from tf.volumes import getVolumes getVolumes(volumeDir) : List volumes in a directory. : tf.volumes.extract.getVolumes python from tf.volumes import extract extract(work, volumes, .) : Extracts volumes from a work : tf.volumes.extract python from tf.volumes import collect collect(volumes, work, .) : Collects several volumes into a new collection : tf.volumes.collect - Dataset Operations python from tf.dataset import modify modify(source, target, .) : Modifies a TF dataset into a new TF dataset : tf.dataset.modify python from tf.dataset import Versions Versions(api, va, vb, slotMap) : Extends a slot mapping between versions of a TF dataset to a complete node mapping : tf.dataset.nodemaps - Data Interchange Custom node sets for search python from tf.lib import readSets from tf.lib import writeSets python readSets(sourceFile) : reads a named sets from file : tf.lib.readSets python writeSets(sets, destFile) : writes a named sets to file : tf.lib.writeSets - Export to Excel python A.export(results, .) : export formatted data : tf.advanced.display.export - Export to ZIP python A.zipAll() : store the complete corpus data in a file complete.zip : tf.advanced.zipdata.zipAll - Interchange with external annotation tools python from tf.convert.addnlp import NLPipeline python NLPipeline() : generate plain text, feed into NLP, ingest results : tf.convert.addnlp - python from convert.recorder import Recorder python Recorder() : generate annotatable plain text and import annotations : tf.convert.recorder - XML / TEI import python from tf.convert.xml import XML python X = XML( .) : convert XML source to full-fledged TF dataset plus app but no docs; put in your own conversion code, if you wish; see [Greek New Testament](https: nbviewer.org/github/ETCBC/nestle1904/blob/master/programs/tfFromLowfat.ipynb) : tf.convert.xml python from tf.convert.tei import TEI python T = TEI( .) : convert TEI source to full-fledged TF dataset plus app plus docs : tf.convert.tei - WATM export python from tf.app import use from tf.convert.watm import WATM python A = use( .) WA = WATM(A, ns, .) WA.makeText() WA.makeAnno() WA.writeAll() WA.testAll() : convert TF dataset to text tokens and annotations in JSON format, for consumption by TextRepo/AnnoRepo of [KNAW/HuC Digital Infrastructure](https: di.huc.knaw.nl/text-analysis-en.html). See [Mondriaan Proeftuin](https: github.com/annotation/mondriaan) [Suriano Letters](https: gitlab.huc.knaw.nl/suriano/letters) [TransLatin Corpus](https: gitlab.huc.knaw.nl/translatin/corpus) : tf.convert.watm python from tf.convert.watm import WATMS python W = WATM(org, repo, backend, ns, .) W.produce() : convert series of TF datasets to WATM : tf.convert.watm.WATMS - NLP import in order to use this, install Spacy, see tf.tools.myspacy python from tf.convert.addnlp import addTokensAndSentences python newVersion = addTokensAndSenteces(A) : add NLP output from Spacy to an existing TF dataset. See the docs how this is broken down in separate steps. : tf.convert.addnlp - pandas export python A.exportPandas() : export dataset as pandas data frame : tf.convert.pandas - MQL interchange python TF.exportMQL(mqlDb, exportDir=None) A.exportMQL(mqlDb, exportDir=None) : export loaded dataset to MQL : tf.convert.mql.exportMQL python from tf.convert.mql import importMQL TF = importMQL(mqlFile, saveDir) : convert MQL file to TF dataset : tf.convert.mql.importMQL - Walker conversion python from tf.convert.walker import CV python cv = CV(TF) : convert structured data to TF dataset : tf.convert.walker - Exploding python from tf.convert.tf import explode python explode(inLocation, outLocation) : explode TF feature files to straight data files without optimizations : tf.convert.tf.explode - TF App development python A.reuse() : reload configuration data : tf.advanced.app.App.reuse python from tf.advanced.find import loadModule python mmm = loadModule(\"mmm\", args) : load specific module supporting the corpus app : tf.advanced.find.loadModule ~/mypath/myname/app/config.yaml : settings for a TF App : tf.advanced.settings - Layered search (these work on the command-line if TF is installed) sh tf-make {dataset} {client} ship : generate a static site with a search interface in client-side JavaScript and publish it to GitHub pages. If {client} is left out, generate all clients that are defined for this dataset. Clients are defined in the app-{dataset} repo, under layeredsearch . More commands [here](https: github.com/annotation/text-fabric/blob/master/tf/client/make/help.py). : tf.client.make.build sh tf-make {dataset} serve : serve the search interfaces defined for {dataset} locally. More commands [here](https: github.com/annotation/text-fabric/blob/master/tf/client/make/help.py). - Annotation tools (these work in the TF browser and in Jupyter Notebooks) Named Entity Annotation sh tf {org}/{repo} tool=ner : Starts the TF browser for the corpus in org / repo and opens the manual annotation tool. : tf.about.annotateBrowser python NE = A.makeNer() : Sets up the 'manual' annotation API for the corpus in A . : tf.browser.ner.ner : More info and examples in tf.about.annotate . - Command-line tools (these work on the command-line if TF is installed) sh tf {org}/{repo} tf {org}/{repo} : Starts the TF browser for the corpus in org / repo . : tf.browser.start sh tf-zipall : Zips the TF dataset located by the current directory, with all its additional data modules , but only the latest version , so that it can be attached to a release on GitHub / GitLab. : tf.advanced.zipdata.zipAll and tf.zip sh tf-zip {org}/{repo} : Zips the TF dataset in org / repo so that it can be attached to a release on GitHub / GitLab. : tf.advanced.zipdata sh tf-nbconvert {inDirectory} {outDirectory} : Converts notebooks in inDirectory to HTML and stores them in outDirectory . : tf.tools.nbconvert sh tf-xmlschema analysis {schema}.xsd : Analyses an XML schema file and extracts meaningful information for processing the XML that adheres to that schema. : tf.tools.xmlschema sh tf-fromxml : When run in a repo it finds an XML source and converts it to TF. The resulting TF data is delivered in the repo. There is a hook to put your own conversion code in. : tf.convert.xml sh tf-fromtei : When run in a repo it finds a TEI source and converts it to TF. The resulting TF data is delivered in the repo. : tf.convert.tei sh tf-addnlp : When run in the repo of a TF dataset, it adds NLP output to it after running Spacy to get them. : tf.convert.addnlp " }, { "ref":"tf.volumes", @@ -6586,6 +6624,12 @@ INDEX=[ "func":1 }, { +"ref":"tf.convert.app.app.TfApp.featureTypes", +"url":16, +"doc":"For which node types is each feature defined? It computes on the fly for each feature the node types for which the feature has defined values. Parameters show: boolean, optional True Whether to output the result in pretty markdown. Returns - dict If show is true, None is returned, but if show is false, a dict is returned, keyed by features and the value for each feature is the list of types for which it has defined values.", +"func":1 +}, +{ "ref":"tf.convert.app.app.TfApp.context", "url":16, "doc":"Result of interpreting all configuration options in config.yaml ." diff --git a/tf/about/annotate.html b/tf/about/annotate.html index ff95bc9f2..f28562c21 100644 --- a/tf/about/annotate.html +++ b/tf/about/annotate.html @@ -298,7 +298,7 @@
"""
.. include:: ../docs/about/annotate.md
diff --git a/tf/about/annotateBrowser.html b/tf/about/annotateBrowser.html
index 43ad8ae82..eec0d597a 100644
--- a/tf/about/annotateBrowser.html
+++ b/tf/about/annotateBrowser.html
@@ -267,7 +267,7 @@ Programming
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/annotateBrowser.md
diff --git a/tf/about/apps.html b/tf/about/apps.html
index 509f4025d..407e7ff52 100644
--- a/tf/about/apps.html
+++ b/tf/about/apps.html
@@ -115,7 +115,7 @@ Two contexts
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/apps.md
diff --git a/tf/about/background.html b/tf/about/background.html
index 366259aaa..e2a524172 100644
--- a/tf/about/background.html
+++ b/tf/about/background.html
@@ -155,7 +155,7 @@ History
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/background.md
diff --git a/tf/about/browser.html b/tf/about/browser.html
index dad9e2edf..4ed23c43f 100644
--- a/tf/about/browser.html
+++ b/tf/about/browser.html
@@ -174,7 +174,7 @@ UNICODE in Excel CSVs
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/browser.md
diff --git a/tf/about/clientmanual.html b/tf/about/clientmanual.html
index ff665d93d..500256553 100644
--- a/tf/about/clientmanual.html
+++ b/tf/about/clientmanual.html
@@ -565,7 +565,7 @@ Credits
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/clientmanual.md
diff --git a/tf/about/code.html b/tf/about/code.html
index a4e0f00d5..4873a5189 100644
--- a/tf/about/code.html
+++ b/tf/about/code.html
@@ -98,7 +98,7 @@ Writing
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/code.md
diff --git a/tf/about/corpora.html b/tf/about/corpora.html
index 9ab95dd2f..d18d034e6 100644
--- a/tf/about/corpora.html
+++ b/tf/about/corpora.html
@@ -351,7 +351,7 @@ Extra data
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/corpora.md
diff --git a/tf/about/datamodel.html b/tf/about/datamodel.html
index fa4b85bb7..fefde1c49 100644
--- a/tf/about/datamodel.html
+++ b/tf/about/datamodel.html
@@ -265,7 +265,7 @@ Serializing and pre-computing
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/datamodel.md
diff --git a/tf/about/datasharing.html b/tf/about/datasharing.html
index 49004bb00..f16c91763 100644
--- a/tf/about/datasharing.html
+++ b/tf/about/datasharing.html
@@ -362,7 +362,7 @@ More modules at the same time
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/datasharing.md
diff --git a/tf/about/displaydesign.html b/tf/about/displaydesign.html
index b2a55f270..aa7091185 100644
--- a/tf/about/displaydesign.html
+++ b/tf/about/displaydesign.html
@@ -151,7 +151,7 @@ Output
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/displaydesign.md
diff --git a/tf/about/faq.html b/tf/about/faq.html
index 7c4e0ccce..3bd6efb3f 100644
--- a/tf/about/faq.html
+++ b/tf/about/faq.html
@@ -161,7 +161,7 @@ GitHub Rate Limit Exceeded!
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/faq.md
diff --git a/tf/about/fileformats.html b/tf/about/fileformats.html
index 6ddd133b8..71ca6fe33 100644
--- a/tf/about/fileformats.html
+++ b/tf/about/fileformats.html
@@ -158,7 +158,7 @@ Single values
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/fileformats.md
diff --git a/tf/about/index.html b/tf/about/index.html
index 3670197b8..f26fea21d 100644
--- a/tf/about/index.html
+++ b/tf/about/index.html
@@ -33,7 +33,7 @@ Documents
Expand source code
-Browse git
+Browse git
"""
# Documents
diff --git a/tf/about/install.html b/tf/about/install.html
index 758a43bd7..d92715c54 100644
--- a/tf/about/install.html
+++ b/tf/about/install.html
@@ -108,7 +108,7 @@ Note for Linux users
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/install.md
diff --git a/tf/about/manual.html b/tf/about/manual.html
index 85f2cb13a..376267921 100644
--- a/tf/about/manual.html
+++ b/tf/about/manual.html
@@ -390,7 +390,7 @@ Keyboard shortcuts
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/manual.md
diff --git a/tf/about/optimizations.html b/tf/about/optimizations.html
index b3861f417..4a80a631b 100644
--- a/tf/about/optimizations.html
+++ b/tf/about/optimizations.html
@@ -187,7 +187,7 @@ Edge features
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/optimizations.md
diff --git a/tf/about/releases.html b/tf/about/releases.html
index 89632fbd9..8d6d0f747 100644
--- a/tf/about/releases.html
+++ b/tf/about/releases.html
@@ -43,6 +43,20 @@ Release notes
12
12.5
+12.5.2
+2024-06-13
+
+-
+
New function to show the types for which each feature has defined values.
+Thanks to Marek Polášek for asking for it, writing an algorithm to produce this
+information, and then speeding it up 10-fold! For details see this
+cookbook
+
+-
+
Working on integrating NER by spreadsheet in the TF browser. This is currently in
+an unfinished state.
+
+
12.5.1
2024-06-06
@@ -486,7 +500,7 @@ Older releases
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/releases.md
@@ -560,6 +574,7 @@ Index
- Release notes
- 12
- 12.5
diff --git a/tf/about/releasesold.html b/tf/about/releasesold.html
index 43bdea740..aaec95b55 100644
--- a/tf/about/releasesold.html
+++ b/tf/about/releasesold.html
@@ -3430,7 +3430,7 @@
Changed
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/releasesold.md
diff --git a/tf/about/searchdesign.html b/tf/about/searchdesign.html
index 467f21017..9b0ba3906 100644
--- a/tf/about/searchdesign.html
+++ b/tf/about/searchdesign.html
@@ -477,7 +477,7 @@ Small-first strategy
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/searchdesign.md
diff --git a/tf/about/searchusage.html b/tf/about/searchusage.html
index 018aa27b8..004f51a26 100644
--- a/tf/about/searchusage.html
+++ b/tf/about/searchusage.html
@@ -776,7 +776,7 @@ Implementation
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/searchusage.md
diff --git a/tf/about/tests.html b/tf/about/tests.html
index 0a451dddf..535966ad0 100644
--- a/tf/about/tests.html
+++ b/tf/about/tests.html
@@ -71,7 +71,7 @@ Relations
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/tests.md
diff --git a/tf/about/use.html b/tf/about/use.html
index 994dff8d2..230b9fecb 100644
--- a/tf/about/use.html
+++ b/tf/about/use.html
@@ -90,7 +90,7 @@ TF API
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/use.md
diff --git a/tf/about/usefunc.html b/tf/about/usefunc.html
index 6920112b6..d739f268d 100644
--- a/tf/about/usefunc.html
+++ b/tf/about/usefunc.html
@@ -419,7 +419,7 @@ Prevent data loading
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/usefunc.md
diff --git a/tf/about/variants.html b/tf/about/variants.html
index 89268be5f..15b284cd3 100644
--- a/tf/about/variants.html
+++ b/tf/about/variants.html
@@ -438,7 +438,7 @@ The stack
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/variants.md
diff --git a/tf/about/volumes.html b/tf/about/volumes.html
index fffb9a67c..3e9795860 100644
--- a/tf/about/volumes.html
+++ b/tf/about/volumes.html
@@ -323,7 +323,7 @@ Reflection
Expand source code
-Browse git
+Browse git
"""
.. include:: ../docs/about/volumes.md
diff --git a/tf/advanced/annotate.html b/tf/advanced/annotate.html
index 9cc18c91d..b493c3e85 100644
--- a/tf/advanced/annotate.html
+++ b/tf/advanced/annotate.html
@@ -34,7 +34,7 @@ Module tf.advanced.annotate
Expand source code
-Browse git
+Browse git
"""
Enable manual annotation APIs.
@@ -84,7 +84,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def annotateApi(app):
"""Produce the interchange functions API.
@@ -106,7 +106,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def makeNer(app):
return NER(app)
diff --git a/tf/advanced/app.html b/tf/advanced/app.html
index 2a134a204..81b0d54fa 100644
--- a/tf/advanced/app.html
+++ b/tf/advanced/app.html
@@ -31,12 +31,12 @@ Module tf.advanced.app
Expand source code
-Browse git
+Browse git
import types
import traceback
-from ..parameters import ORG, RELATIVE, OMAP
+from ..parameters import ORG, RELATIVE, OMAP, OTYPE
from ..fabric import Fabric
from ..lib import readSets
from ..core.helpers import console, mergeDict
@@ -417,6 +417,67 @@ Module tf.advanced.app
if hoist:
api.makeAvailableIn(hoist)
+ def featureTypes(self, show=True):
+ """For which node types is each feature defined?
+
+ It computes on the fly for each feature the node types for which
+ the feature has defined values.
+
+ Parameters
+ ----------
+ show: boolean, optional True
+ Whether to output the result in pretty markdown.
+
+ Returns
+ -------
+ dict
+ If `show` is true, None is returned, but if `show` is false,
+ a dict is returned, keyed by features and the value for each feature
+ is the list of types for which it has defined values.
+ """
+ if hasattr(self, "featureTypeMap"):
+ info = self.featureTypeMap
+ else:
+ api = self.api
+ F = api.F
+ Fs = api.Fs
+ Fall = api.Fall
+
+ nodesByType = {}
+
+ allFeatures = [p for p in Fall() if p != OTYPE]
+ allTypes = F.otype.all
+
+ for tp in allTypes:
+ nodesByType[tp] = set(F.otype.s(tp))
+
+ info = {}
+
+ for feat in allFeatures:
+ featNodes = {i[0] for i in Fs(feat).items()}
+
+ for tp in allTypes:
+ if len(featNodes & nodesByType[tp]) > 0:
+ info.setdefault(feat, []).append(tp)
+
+ self.featureTypeMap = info
+
+ if show:
+ md = []
+ md.extend(["""feature | node types""", """:- | :-"""])
+
+ for feat, tps in sorted(info.items()):
+ tpsRep = "*" + "*, *".join(tps) + "*"
+ md.append(f"""**{feat}** | {tpsRep}""")
+
+ self.dm("\n".join(md))
+ self.dm(
+ "To get this overview in a dict, "
+ "call `A.featureTypes(show=False)`\n"
+ )
+ else:
+ return info
+
def findApp(
appName,
@@ -834,7 +895,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def findApp(
appName,
@@ -1129,7 +1190,7 @@ Returns
Expand source code
-Browse git
+Browse git
def loadApp(silent=DEEP):
"""Loads a given TF app or loads the TF app based on the working directory.
@@ -1197,7 +1258,7 @@ See Also
Expand source code
-Browse git
+Browse git
def useApp(appName, backend):
"""Make use of a corpus.
@@ -1299,7 +1360,7 @@ Parameters
Expand source code
-Browse git
+Browse git
class App:
def __init__(
@@ -1626,7 +1687,68 @@ Parameters
displayApi(self, silent=DEEP)
textApi(self)
if hoist:
- api.makeAvailableIn(hoist)
+ api.makeAvailableIn(hoist)
+
+ def featureTypes(self, show=True):
+ """For which node types is each feature defined?
+
+ It computes on the fly for each feature the node types for which
+ the feature has defined values.
+
+ Parameters
+ ----------
+ show: boolean, optional True
+ Whether to output the result in pretty markdown.
+
+ Returns
+ -------
+ dict
+ If `show` is true, None is returned, but if `show` is false,
+ a dict is returned, keyed by features and the value for each feature
+ is the list of types for which it has defined values.
+ """
+ if hasattr(self, "featureTypeMap"):
+ info = self.featureTypeMap
+ else:
+ api = self.api
+ F = api.F
+ Fs = api.Fs
+ Fall = api.Fall
+
+ nodesByType = {}
+
+ allFeatures = [p for p in Fall() if p != OTYPE]
+ allTypes = F.otype.all
+
+ for tp in allTypes:
+ nodesByType[tp] = set(F.otype.s(tp))
+
+ info = {}
+
+ for feat in allFeatures:
+ featNodes = {i[0] for i in Fs(feat).items()}
+
+ for tp in allTypes:
+ if len(featNodes & nodesByType[tp]) > 0:
+ info.setdefault(feat, []).append(tp)
+
+ self.featureTypeMap = info
+
+ if show:
+ md = []
+ md.extend(["""feature | node types""", """:- | :-"""])
+
+ for feat, tps in sorted(info.items()):
+ tpsRep = "*" + "*, *".join(tps) + "*"
+ md.append(f"""**{feat}** | {tpsRep}""")
+
+ self.dm("\n".join(md))
+ self.dm(
+ "To get this overview in a dict, "
+ "call `A.featureTypes(show=False)`\n"
+ )
+ else:
+ return info
Subclasses
@@ -1641,6 +1763,92 @@ Instance variables
Methods
+
+def featureTypes(self, show=True)
+
+-
+
For which node types is each feature defined?
+It computes on the fly for each feature the node types for which
+the feature has defined values.
+Parameters
+
+show
: boolean
, optional True
+- Whether to output the result in pretty markdown.
+
+Returns
+
+dict
+- If
show
is true, None is returned, but if show
is false,
+a dict is returned, keyed by features and the value for each feature
+is the list of types for which it has defined values.
+
+
+
+Expand source code
+Browse git
+
+def featureTypes(self, show=True):
+ """For which node types is each feature defined?
+
+ It computes on the fly for each feature the node types for which
+ the feature has defined values.
+
+ Parameters
+ ----------
+ show: boolean, optional True
+ Whether to output the result in pretty markdown.
+
+ Returns
+ -------
+ dict
+ If `show` is true, None is returned, but if `show` is false,
+ a dict is returned, keyed by features and the value for each feature
+ is the list of types for which it has defined values.
+ """
+ if hasattr(self, "featureTypeMap"):
+ info = self.featureTypeMap
+ else:
+ api = self.api
+ F = api.F
+ Fs = api.Fs
+ Fall = api.Fall
+
+ nodesByType = {}
+
+ allFeatures = [p for p in Fall() if p != OTYPE]
+ allTypes = F.otype.all
+
+ for tp in allTypes:
+ nodesByType[tp] = set(F.otype.s(tp))
+
+ info = {}
+
+ for feat in allFeatures:
+ featNodes = {i[0] for i in Fs(feat).items()}
+
+ for tp in allTypes:
+ if len(featNodes & nodesByType[tp]) > 0:
+ info.setdefault(feat, []).append(tp)
+
+ self.featureTypeMap = info
+
+ if show:
+ md = []
+ md.extend(["""feature | node types""", """:- | :-"""])
+
+ for feat, tps in sorted(info.items()):
+ tpsRep = "*" + "*, *".join(tps) + "*"
+ md.append(f"""**{feat}** | {tpsRep}""")
+
+ self.dm("\n".join(md))
+ self.dm(
+ "To get this overview in a dict, "
+ "call `A.featureTypes(show=False)`\n"
+ )
+ else:
+ return info
+
+
def hoist(self, hoist, silent=None)
@@ -1665,7 +1873,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def hoist(self, hoist, silent=None):
"""Hoist the API handles of this TF app to the global scope.
@@ -1733,7 +1941,7 @@ Returns
Expand source code
-Browse git
+Browse git
def load(self, features, silent=SILENT_D):
"""Loads extra features in addition to the main dataset.
@@ -1771,7 +1979,7 @@ Returns
Expand source code
-Browse git
+Browse git
def reinit(self):
"""TF Apps may override this method.
@@ -1806,7 +2014,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def reuse(self, hoist=False):
"""Re-initialize the app.
@@ -1950,8 +2158,9 @@ Index
-
App
-
+
context
+featureTypes
hoist
load
reinit
diff --git a/tf/advanced/condense.html b/tf/advanced/condense.html
index b1681fda5..ea00ab469 100644
--- a/tf/advanced/condense.html
+++ b/tf/advanced/condense.html
@@ -31,7 +31,7 @@ Module tf.advanced.condense
Expand source code
-Browse git
+Browse git
def condense(api, tuples, condenseType, multiple=False):
F = api.F
@@ -135,7 +135,7 @@ Functions
Expand source code
-Browse git
+Browse git
def condense(api, tuples, condenseType, multiple=False):
F = api.F
@@ -192,7 +192,7 @@ Functions
Expand source code
-Browse git
+Browse git
def condenseSet(api, tup, condenseType):
F = api.F
diff --git a/tf/advanced/data.html b/tf/advanced/data.html
index 532fabb42..a56fbc07b 100644
--- a/tf/advanced/data.html
+++ b/tf/advanced/data.html
@@ -31,7 +31,7 @@ Module tf.advanced.data
Expand source code
-Browse git
+Browse git
from ..core.helpers import itemize
from ..core.files import backendRep, expandDir, prefixSlash, normpath
@@ -496,7 +496,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getModulesData(*args):
"""Retrieve all data for a corpus.
@@ -556,7 +556,7 @@ Parameters
Expand source code
-Browse git
+Browse git
class AppData:
def __init__(
@@ -989,7 +989,7 @@ See Also
Expand source code
-Browse git
+Browse git
def getExtra(self):
"""Get the extra data specified by the settings of the corpus.
@@ -1051,7 +1051,7 @@ See Also
Expand source code
-Browse git
+Browse git
def getMain(self):
"""Get the main data of the corpus.
@@ -1126,7 +1126,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getModule(
self,
@@ -1271,7 +1271,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getModules(self):
"""Get data from additional local directories.
@@ -1342,7 +1342,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getRefs(self):
"""Get data from additional modules.
@@ -1397,7 +1397,7 @@ See Also
Expand source code
-Browse git
+Browse git
def getStandard(self):
"""Get the data of the standard modules specified by the settings of the corpus.
diff --git a/tf/advanced/display.html b/tf/advanced/display.html
index fb02d9b0e..c9ed13f11 100644
--- a/tf/advanced/display.html
+++ b/tf/advanced/display.html
@@ -69,7 +69,7 @@ See also
Expand source code
-Browse git
+Browse git
"""
# Display
@@ -1126,7 +1126,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def displayApi(app, silent=SILENT_D):
"""Produce the display API.
@@ -1193,7 +1193,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def displayReset(app, *options):
"""Restore display parameters to their defaults.
@@ -1251,7 +1251,7 @@ See Also
Expand source code
-Browse git
+Browse git
def displaySetup(app, *show, **options):
"""Set up all display parameters.
@@ -1309,7 +1309,7 @@ See Also
Expand source code
-Browse git
+Browse git
def displayShow(app, *options):
"""Show display parameters.
@@ -1444,7 +1444,7 @@ Results
Expand source code
-Browse git
+Browse git
def export(app, tuples, toDir=None, toFile="results.tsv", **options):
"""Exports an iterable of tuples of nodes to an Excel friendly TSV file.
@@ -1589,7 +1589,7 @@ Returns
Expand source code
-Browse git
+Browse git
def getCss(app):
"""Export the CSS for this app.
@@ -1639,7 +1639,7 @@ Returns
Expand source code
-Browse git
+Browse git
def getToolCss(app, tool):
"""Export the CSS for a tool of this app.
@@ -1689,7 +1689,7 @@ Returns
Expand source code
-Browse git
+Browse git
def loadCss(app):
"""Load the CSS for this app.
@@ -1768,7 +1768,7 @@ Returns
Expand source code
-Browse git
+Browse git
def loadToolCss(app, tool, extraCss):
"""Load the Tool CSS for this app.
@@ -1840,7 +1840,7 @@ Result
Expand source code
-Browse git
+Browse git
def plain(app, n, _inTuple=False, _asString=False, explain=False, **options):
"""Display the plain text of a node.
@@ -1926,7 +1926,7 @@ Result
Expand source code
-Browse git
+Browse git
def plainTuple(
app,
@@ -2169,7 +2169,7 @@ Result
Expand source code
-Browse git
+Browse git
def pretty(app, n, explain=False, _asString=False, **options):
"""Displays the material that corresponds to a node in a graphical way.
@@ -2248,7 +2248,7 @@ Result
Expand source code
-Browse git
+Browse git
def prettyTuple(app, tup, seq=None, _asString=False, item=RESULT, **options):
"""Displays the material that corresponds to a tuple of nodes in a graphical way.
@@ -2361,7 +2361,7 @@ Result
Expand source code
-Browse git
+Browse git
def show(app, tuples, _asString=False, **options):
"""Displays an iterable of tuples of nodes.
@@ -2464,7 +2464,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def table(app, tuples, _asString=False, **options):
"""Plain displays of an iterable of tuples of nodes in a table.
diff --git a/tf/advanced/find.html b/tf/advanced/find.html
index 49eca61bd..fa0edada0 100644
--- a/tf/advanced/find.html
+++ b/tf/advanced/find.html
@@ -31,7 +31,7 @@ Module tf.advanced.find
Expand source code
-Browse git
+Browse git
import sys
from importlib import util
@@ -270,7 +270,7 @@ Returns
Expand source code
-Browse git
+Browse git
def findAppClass(appName, appPath):
"""Find the class definition of an app.
@@ -325,7 +325,7 @@ See Also
Expand source code
-Browse git
+Browse git
def findAppConfig(
appName,
@@ -474,7 +474,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def loadModule(moduleName, *args):
"""Load a module dynamically, by name.
diff --git a/tf/advanced/helpers.html b/tf/advanced/helpers.html
index cad24f313..b4ffc5af5 100644
--- a/tf/advanced/helpers.html
+++ b/tf/advanced/helpers.html
@@ -31,7 +31,7 @@ Module tf.advanced.helpers
Expand source code
-Browse git
+Browse git
import collections
from textwrap import dedent
@@ -864,7 +864,7 @@ Functions
Expand source code
-Browse git
+Browse git
def backendRepl(match):
thisBackend.append(match.group(1))
@@ -894,7 +894,7 @@ Returns
Expand source code
-Browse git
+Browse git
def dh(html, inNb="ipython", unexpand=False):
"""Display HTML.
@@ -952,7 +952,7 @@ Returns
Expand source code
-Browse git
+Browse git
def dm(md, inNb="ipython", unexpand=False):
"""Display markdown.
@@ -995,7 +995,7 @@ Returns
Expand source code
-Browse git
+Browse git
def getHeaderTypes(app, tuples):
api = app.api
@@ -1034,7 +1034,7 @@ Returns
Expand source code
-Browse git
+Browse git
def getHeaders(app, tuples):
headerTypes = getHeaderTypes(app, tuples)
@@ -1058,7 +1058,7 @@ Returns
Expand source code
-Browse git
+Browse git
def getLocalDir(backend, cfg, local, version):
provenanceSpec = cfg.get("provenanceSpec", {})
@@ -1098,7 +1098,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getResultsX(app, results, features, condenseType, fmt=None):
"""Transform a uniform iterable of nodes into a table with extra information.
@@ -1194,7 +1194,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getRowsX(app, tuples, features, condenseType, fmt=None):
"""Transform an iterable of nodes into a table with extra information.
@@ -1218,7 +1218,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getText(
app, isPretty, n, nType, outer, first, last, level, passage, descend, options=None
@@ -1311,7 +1311,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getTuplesX(app, results, condenseType, fmt=None):
"""Transform a non-uniform iterable of nodes into a table with extra information.
@@ -1379,7 +1379,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def getValue(app, n, nType, feat, suppress, math=False):
F = app.api.F
@@ -1408,7 +1408,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def hData(x):
if not x:
@@ -1439,7 +1439,7 @@ Parameters
Expand source code
-Browse git
+Browse git
def hDict(x, outer=False):
elem = f"{'o' if outer else 'u'}l"
@@ -1469,7 +1469,7 @@ Parameters