hunspell accept possessive with word ending with s (trailing apostrophe after s) - atom-editor

How to have hunspell accept possessive (trailing apostrophe) with a plural?
E.g. users'
It took me a long time to figure this out (not an expert in this; just want to have decent spell check when using atom linter-spell for writing latex documents), so I thought it is worthwhile to share it.

I am using dictionaries from https://github.com/wooorm/dictionaries
Open en_US.aff with some text editor.
Replace
SFX M Y 1
SFX M 0 's .
with
SFX M Y 2
SFX M 0 's .
SFX M 0 s' .

Related

What is the correct name for those mathematical operations?

I am not an english speaker, however I need to write code where I need to include print messages in English, hence using english terminology from Math, statistics etc.
This is the case:
I have two lists and I compare them, let's say:
list 1 - 1 2 3 4 5
list 2 - 2 4 6
So naturally when I compare both lists you see that 2 4 are present in both lists. What is the operation itself called? Because when I try to translate it from my language to english it's "section" or "cutting". I don't believe that this is the official mathematical term for this operation.
Also I want to know what is it called when you show the things that are missing in both lists. For example 1 3 5 6 ?
Thanks and sorry for the silly question.
Intersection for {1,2,3,4,5} ; {2,4,6} = {2,4}
Symmetric difference for {1,2,3,4,5} ; {2,4,6} = {1,3,5,6}

How to read GDB 13 database? And is there any easy way to clean this data?

5
0001 -417.031
C 1.04168, -0.05620, -0.07148 1.041682, -0.056200, -0.071481
H 2.15109, -0.05620, -0.07150 2.130894, -0.056202, -0.071496
H 0.67187, 0.17923, -1.09059 0.678598, 0.174941, -1.072044
H 0.67188, 0.70866, 0.64196 0.678613, 0.694746, 0.628980
H 0.67188, -1.05649, 0.23421 0.678614, -1.038285, 0.228641
8
0002 -711.117
C 0.99571, 0.01149, -0.09922 0.995914, 0.011511, -0.099221
C 2.51489, 0.01148, -0.09922 2.514686, 0.011466, -0.099226
H 0.61911, 0.74910, -0.83887 0.597259, 0.729877, -0.819596
H 0.61911, 0.28325, 0.90938 0.597259, 0.276170, 0.883106
H 0.61909, -0.99785, -0.36818 0.597278, -0.971531, -0.361167
H 2.89151, 1.02083, 0.16973 2.913322, 0.994509, 0.162719
H 2.89149, -0.26027, -1.10783 2.913341, -0.253192, -1.081553
H 2.89149, -0.72612, 0.64042 2.913341, -0.706900, 0.621148
These two data points are from chemical database GDB 13. I try to understand what these numbers are representing. I know 5 and 8 are atomic number; 0001 and 0002 are atom id; and -417.031 and 711.117 are atomization energies. However, I don't quite understand what those number below means. However, I am pretty sure they are the geometry representation in 3 dimension space. If that is the geometry representation in 3 dimension space, then why there are 6 numbers in there. How to read those 6 numbers?
I am also trying to use BOB representation to reform the data, is there any ways to do that instead of hard coding? If not, I am using R, is R able to do that ?
Have a look at the original paper in ‎Int. J. Quantum Chem., 2015, 115, 1058-1073 (DOI).
The Extended XYZ format is explained in Fig. 7 of the article.
You are right that the first line denotes the number of atoms k, while the second line consists of an identifier and the energy of atomization for the particular molecule.
The next k lines contain two sets of cartesian coordinates (in Angström). The left block contains the x,y,z coordinates from a force-field calculation (UFF), while the coordinates on the right stem from a DFT calculation.
A common tool to read and convert coordinate files in various formats is Open Babel. Have a look at th accompanying paper in J. Cheminformatics, 2013,3:33 (DOI)
There exist various bindings for Open Babel, and apparently, there is is one for r too. Have a look.
I just ran a quick test on the first entry in the data from the supplement of the paper by Mathias Rupp using Open Babel 2.3.2:
obabel -ixyz c1.xyz -oxyz -O c1a.xyz
Apparently, only the left coordinate block is read in! If you suspect that the coordinates from UFF and DFT calculations differ significantly, you're probably on your own. However, given that the file format is documented, this should not be a major problem.
If you don't mind a remark, the title of your question is somewhat misleading. The data in question is only remotely related to GDB-13. To my knowledge, the GDB files from Jean-Louis Reymond do not contain any coordinates. They are large collections SMILES strings, from which coordinates would have to be generated for each entry.

DFA to mathematical notation

Let's say I have a DFA with alphabet {0,1} which basically accepts any strings as long as there is no consecutive 0's (at most one 0 at a time). How do I express this in a mathematical notation?
I was thinking of any number of 1's followed by either one or none 0's, then any number of 1's..... but couldn't figure out the appropriate mathematical notation for it.
My attempt but obviously incorrect since 1010 should be accepted but the notation does not indicate so:
As a regular expression you could write this as 1*(01+)*0?. Arbitrary many ones, then arbitrary many groups of exactly one zero followed by at least one one, and in the end possibly one zero. Nico already wrote as much in a comment. Personally I'd consider such a regular expression sufficiently formal to call it mathematical.
Now if you want to write this using exponents, you could do something like
L = {1a (0 11+bi)c 0d mod 2 | a,bi,c,d ∈ ℕ for 1≤i≤c}
Writing a bit of formula in the exponents has the great benefit that you don't have to split the place where you use the exponent and the place where you define the range. Here all my numbers are natural numbers (including zero). Adding one means at least one repetition. And the modulo 2 makes the exponent 0 or 1 to express the ? in the regular expression.
Of course, there is an implied assumption here, namely that the c serves as a kind of loop, but it doesn't repeat the same expression every time, but the bi changes for each iteration. The range of the i implies this interpretation, but it might be considered confusing or even incorrect nonetheless.
The proper solution here would be using some formal product notation using a big ∏ with a subscript i = 1 and a superscript c. That would indicate that for every i from 1 through c you want to compute the given expression (i.e. 011+bi) and concatenate all the resulting words.
You could also give a recursive definition: The minimal fixpoint of the following definition
L' = {1, 10} ∪ {1a 0 b | a ∈ ℕ, a > 0, b ∈ L'}
is the language of all words which begin with a 1 and satisfy your conditions. From this you can build
L = {ε, 0} ∪ L' ∪ {0 a | a ∈ L'}
so you add the empty word and the lone zero, then take all the words from L' in their unmodified form and in the form with a zero added in front.

formula for knowing the fibonacci character at certain index

Is there any formula you can directly apply for knowing a fibonacci character within a word without having to construct the word from scratch.
For example. Let's consider:
0 a
1 b
2 ba
3 bab
4 babba
5 babbabab
Is there a way to find what character is in w(4) at index 3 which in this case is b as
w(4) equals babba provided you know beforehand that w(4) has 5 characters?
Thanks
That would have been really easy to google.
Note: there are no words, like w(4), they are just construction steps of the single infinite word.
You can find the closed formula and its description on wikipedia.

(zsh brace expansion | seq) for character lists - how?

Bash allows me to write the statement,
$ for i in {h..k} ; do echo $i ; done
but zsh only allows number list expansion such as {8..13}.
What's the best workaround? Something like seq for characters...
zsh$ setopt BRACE_CCL
zsh$ echo {a-k}
a b c d e f g h i j k
zsh$ echo {1-9}
1 2 3 4 5 6 7 8 9
From ZSH Documentation:
BRACE_CCL
Expand expressions in braces which would not otherwise
undergo brace expansion to a lexically ordered list of all the
characters. See Brace Expansion.
As this is still a top google result, an updated answer:
The current release supports bash style {c1..c2} where c1 and c2 are characters:
An expression of the form ‘{c1..c2}’, where c1 and c2 are single characters (which may be multibyte characters), is expanded to every character in the range from c1 to c2 in whatever character sequence is used internally. For characters with code points below 128 this is US ASCII (this is the only case most users will need). If any intervening character is not printable, appropriate quotation is used to render it printable. If the character sequence is reversed, the output is in reverse order, e.g. ‘{d..a}’ is substituted as ‘d c b a’.
This is definitely present in 5.0.7 onwards. I can't seem to find when this was introduced in the zsh release history, but the first archived version documenting it indicates it was introduced between July 2012 and November 2014.

Resources