Skip to content

Commit 680ad42

Browse files
syntacticsyntactic
authored andcommitted
I'm updating the copyright information contained within the source code - I didn't actually think that anyone would be using this code at all, so previously the information was invalid. I'm copying the contents of the LICENSE file into the header comments of the Python source.
1 parent fe70551 commit 680ad42

File tree

4 files changed

+89
-98
lines changed

4 files changed

+89
-98
lines changed

DeterministicGenerator.py

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# @copyright: MIT License
2+
# Copyright (c) 2018 syntactic (Pastèque Ho)
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
# The above copyright notice and this permission notice shall be included in all
10+
# copies or substantial portions of the Software.
11+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17+
# SOFTWARE.
18+
# @summary: This file generates all strings described by a non-recursive JSGF grammar.
19+
# Run it by entering into the command line: python DeterministicGenerator.py <grammarFile>
20+
# where <grammarFile> is the path to the JSGF grammar.
21+
# @since: 2014/06/02
22+
123
"""
224
This file deterministically generates strings from a JSGF Grammar, whether there are \
325
weights defined in rules or not. It requires one argument: the path to the JSGF\
@@ -13,31 +35,6 @@
1335
a segmentation fault.
1436
"""
1537

16-
# @copyright: (c)Copyright 2014, THC All Rights Reserved.
17-
# The source code contained or described here in and all documents related
18-
# to the source code ("Material") are owned by THC or its
19-
# suppliers or licensors. Title to the Material remains with THC
20-
# or its suppliers and licensors. The Material contains trade secrets and
21-
# proprietary and confidential information of THC or its suppliers and
22-
# licensors.
23-
24-
# The Material is protected by worldwide copyright and trade secret laws and
25-
# treaty provisions. No part of the Material may be used, copied, reproduced,
26-
# modified, published, uploaded, posted, transmitted, distributed, or disclosed
27-
# in any way without THC's prior express written permission.
28-
29-
# No license under any patent, copyright, trade secret or other intellectual
30-
# property right is granted to or conferred upon you by disclosure or delivery
31-
# of the Materials, either expressly, by implication, inducement, estoppel or
32-
# otherwise. Any license under such intellectual property rights must be express
33-
# and approved by THC in writing.
34-
35-
# @organization: THC Science
36-
# @summary: This file generates all strings described by a non-recursive JSGF grammar.
37-
# Run it by entering into the command line: python DeterministicGenerator.py <grammarFile>
38-
# where <grammarFile> is the path to the JSGF grammar.
39-
# @since: 2014/06/02
40-
4138
import sys, itertools
4239
import JSGFParser as parser
4340
import JSGFGrammar as gram

JSGFGrammar.py

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1+
# @copyright: MIT License
2+
# Copyright (c) 2018 syntactic (Pastèque Ho)
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
# The above copyright notice and this permission notice shall be included in all
10+
# copies or substantial portions of the Software.
11+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17+
# SOFTWARE.
18+
# @summary: This file lays out the class structure for a JSGF Grammar
19+
# @since: 2014/06/02
20+
121
"""
222
This file lays out the class structure for a JSGF Grammar.
323
424
.. module:: JSGFGrammar
525
6-
.. moduleauthor:: Timothy Ho <[email protected]>
26+
.. moduleauthor:: Pastèque Ho <[email protected]>
727
"""
8-
# @copyright: (c)Copyright 2014, THC All Rights Reserved.
9-
# The source code contained or described here in and all documents related
10-
# to the source code ("Material") are owned by THC or its
11-
# suppliers or licensors. Title to the Material remains with THC
12-
# or its suppliers and licensors. The Material contains trade secrets and
13-
# proprietary and confidential information of THC or its suppliers and
14-
# licensors.
15-
16-
# The Material is protected by worldwide copyright and trade secret laws and
17-
# treaty provisions. No part of the Material may be used, copied, reproduced,
18-
# modified, published, uploaded, posted, transmitted, distributed, or disclosed
19-
# in any way without THC's prior express written permission.
20-
21-
# No license under any patent, copyright, trade secret or other intellectual
22-
# property right is granted to or conferred upon you by disclosure or delivery
23-
# of the Materials, either expressly, by implication, inducement, estoppel or
24-
# otherwise. Any license under such intellectual property rights must be express
25-
# and approved by THC in writing.
26-
27-
# @organization: THC Science
28-
# @summary: This file lays out the class structure for a JSGF Grammar
29-
# @since: 2014/06/02
28+
3029

3130
class JSGFExpression():
3231
pass

JSGFParser.py

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
# @copyright: MIT License
2+
# Copyright (c) 2018 syntactic (Pastèque Ho)
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
# The above copyright notice and this permission notice shall be included in all
10+
# copies or substantial portions of the Software.
11+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17+
# SOFTWARE.
18+
# @summary: This file parses a JSGF Grammar and prints it out.
19+
# @since: 2014/06/02
20+
121
"""
222
This file parses a JSGF grammar file and returns a JSGFGrammar object. \
323
It uses the pyparsing module and defines a grammar for JSGF grammars. \
@@ -37,29 +57,6 @@
3757
3858
"""
3959

40-
# @copyright: (c)Copyright 2014, THC All Rights Reserved.
41-
# The source code contained or described here in and all documents related
42-
# to the source code ("Material") are owned by THC or its
43-
# suppliers or licensors. Title to the Material remains with THC
44-
# or its suppliers and licensors. The Material contains trade secrets and
45-
# proprietary and confidential information of THC or its suppliers and
46-
# licensors.
47-
48-
# The Material is protected by worldwide copyright and trade secret laws and
49-
# treaty provisions. No part of the Material may be used, copied, reproduced,
50-
# modified, published, uploaded, posted, transmitted, distributed, or disclosed
51-
# in any way without THC's prior express written permission.
52-
53-
# No license under any patent, copyright, trade secret or other intellectual
54-
# property right is granted to or conferred upon you by disclosure or delivery
55-
# of the Materials, either expressly, by implication, inducement, estoppel or
56-
# otherwise. Any license under such intellectual property rights must be express
57-
# and approved by THC in writing.
58-
59-
# @organization: THC Science
60-
# @summary: This file parses a JSGF Grammar and prints it out.
61-
# @since: 2014/06/02
62-
6360
import sys
6461
import JSGFGrammar as gram
6562
from pyparsing import *

ProbabilisticGenerator.py

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
#/usr/bin/python
2+
3+
# @copyright: MIT License
4+
# Copyright (c) 2018 syntactic (Pastèque Ho)
5+
# Permission is hereby granted, free of charge, to any person obtaining a copy
6+
# of this software and associated documentation files (the "Software"), to deal
7+
# in the Software without restriction, including without limitation the rights
8+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
# copies of the Software, and to permit persons to whom the Software is
10+
# furnished to do so, subject to the following conditions:
11+
# The above copyright notice and this permission notice shall be included in all
12+
# copies or substantial portions of the Software.
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
# @summary: This file generates sentences from a PCFG in JSGF. Run it by entering
21+
# in the command line: python ProbabilisticGenerator.py <grammarFile> <numStrings>
22+
# where <grammarFile> is the path of the JSGF file, and <numString> is the number
23+
# of strings you want to generate
24+
# @since: 2014/06/02
25+
126
"""
227
This file probabilistically generates strings from a JSGF grammar. It takes advantage \
328
of weights assigned to alternatives (separated by pipes) by choosing to \
@@ -17,33 +42,6 @@
1742
weights if they are provided.
1843
"""
1944

20-
#/usr/bin/python
21-
# @copyright: (c)Copyright 2014, THC All Rights Reserved.
22-
# The source code contained or described here in and all documents related
23-
# to the source code ("Material") are owned by THC or its
24-
# suppliers or licensors. Title to the Material remains with THC
25-
# or its suppliers and licensors. The Material contains trade secrets and
26-
# proprietary and confidential information of THC or its suppliers and
27-
# licensors.
28-
29-
# The Material is protected by worldwide copyright and trade secret laws and
30-
# treaty provisions. No part of the Material may be used, copied, reproduced,
31-
# modified, published, uploaded, posted, transmitted, distributed, or disclosed
32-
# in any way without THC's prior express written permission.
33-
34-
# No license under any patent, copyright, trade secret or other intellectual
35-
# property right is granted to or conferred upon you by disclosure or delivery
36-
# of the Materials, either expressly, by implication, inducement, estoppel or
37-
# otherwise. Any license under such intellectual property rights must be express
38-
# and approved by THC in writing.
39-
40-
# @organization: THC Science
41-
# @summary: This file generates sentences from a PCFG in JSGF. Run it by entering
42-
# in the command line: python ProbabilisticGenerator.py <grammarFile> <numStrings>
43-
# where <grammarFile> is the path of the JSGF file, and <numString> is the number
44-
# of strings you want to generate
45-
# @since: 2014/06/02
46-
4745
import sys, itertools, random, bisect, argparse
4846
import JSGFParser as parser
4947
import JSGFGrammar as gram

0 commit comments

Comments
 (0)