You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/04/29 01:34:35 UTC

incubator-joshua git commit: JOSHUA-257 Add license headers to all Python scripts

Repository: incubator-joshua
Updated Branches:
  refs/heads/master 3e2304747 -> 051cc489d


JOSHUA-257 Add license headers to all Python scripts


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/051cc489
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/051cc489
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/051cc489

Branch: refs/heads/master
Commit: 051cc489d0bce3ad928f3383f2b57f0193ae6a0d
Parents: 3e23047
Author: Lewis John McGibbney <le...@jpl.nasa.gov>
Authored: Thu Apr 28 13:26:16 2016 -0700
Committer: Lewis John McGibbney <le...@jpl.nasa.gov>
Committed: Thu Apr 28 13:26:16 2016 -0700

----------------------------------------------------------------------
 scripts/features/addSparseFeatures.py               | 16 ++++++++++++++++
 scripts/lm/compile_berkeley.py                      | 16 ++++++++++++++++
 scripts/samt/filterGrammar.py                       | 16 ++++++++++++++++
 scripts/samt/lexprob2samt.py                        | 16 ++++++++++++++++
 scripts/samt/selectFeatures.py                      | 16 ++++++++++++++++
 scripts/support/merge_lms.py                        | 16 ++++++++++++++++
 scripts/support/run_bundler.py                      | 16 ++++++++++++++++
 scripts/toolkit/chunki.py                           | 16 ++++++++++++++++
 scripts/toolkit/extract_references.py               | 16 ++++++++++++++++
 scripts/toolkit/joini.py                            | 16 ++++++++++++++++
 scripts/toolkit/shorti.py                           | 16 ++++++++++++++++
 .../training/class-lm/replaceTokensWithClasses.py   | 16 ++++++++++++++++
 scripts/training/run_thrax.py                       | 16 ++++++++++++++++
 scripts/training/run_tuner.py                       | 16 ++++++++++++++++
 test/prune-equivalent-translations.py               | 16 ++++++++++++++++
 test/scripts/merge_lms_test.py                      | 15 +++++++++++++++
 test/scripts/run_bundler_test.py                    | 15 +++++++++++++++
 17 files changed, 270 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/features/addSparseFeatures.py
----------------------------------------------------------------------
diff --git a/scripts/features/addSparseFeatures.py b/scripts/features/addSparseFeatures.py
index b711f67..8b45904 100755
--- a/scripts/features/addSparseFeatures.py
+++ b/scripts/features/addSparseFeatures.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import sys
 import gzip

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/lm/compile_berkeley.py
----------------------------------------------------------------------
diff --git a/scripts/lm/compile_berkeley.py b/scripts/lm/compile_berkeley.py
index 6260544..33976b1 100755
--- a/scripts/lm/compile_berkeley.py
+++ b/scripts/lm/compile_berkeley.py
@@ -1,4 +1,20 @@
 #!/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os
 import sys

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/samt/filterGrammar.py
----------------------------------------------------------------------
diff --git a/scripts/samt/filterGrammar.py b/scripts/samt/filterGrammar.py
index 7e24a05..d56efc0 100644
--- a/scripts/samt/filterGrammar.py
+++ b/scripts/samt/filterGrammar.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python -u
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs, re
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/samt/lexprob2samt.py
----------------------------------------------------------------------
diff --git a/scripts/samt/lexprob2samt.py b/scripts/samt/lexprob2samt.py
index 6a15ade..4481ab3 100644
--- a/scripts/samt/lexprob2samt.py
+++ b/scripts/samt/lexprob2samt.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/samt/selectFeatures.py
----------------------------------------------------------------------
diff --git a/scripts/samt/selectFeatures.py b/scripts/samt/selectFeatures.py
index 766bb3a..5588cea 100644
--- a/scripts/samt/selectFeatures.py
+++ b/scripts/samt/selectFeatures.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python -u
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/support/merge_lms.py
----------------------------------------------------------------------
diff --git a/scripts/support/merge_lms.py b/scripts/support/merge_lms.py
index 7588075..2c1c3bc 100755
--- a/scripts/support/merge_lms.py
+++ b/scripts/support/merge_lms.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 import argparse
 import logging
 import os

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/support/run_bundler.py
----------------------------------------------------------------------
diff --git a/scripts/support/run_bundler.py b/scripts/support/run_bundler.py
index ae54221..11a7e64 100755
--- a/scripts/support/run_bundler.py
+++ b/scripts/support/run_bundler.py
@@ -1,5 +1,21 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 """
 Combine a set of Joshua configuration and resources into a portable
 directory tree.

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/toolkit/chunki.py
----------------------------------------------------------------------
diff --git a/scripts/toolkit/chunki.py b/scripts/toolkit/chunki.py
index f783667..766e4e1 100644
--- a/scripts/toolkit/chunki.py
+++ b/scripts/toolkit/chunki.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs
 import gzip

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/toolkit/extract_references.py
----------------------------------------------------------------------
diff --git a/scripts/toolkit/extract_references.py b/scripts/toolkit/extract_references.py
index b52b159..5e096f2 100644
--- a/scripts/toolkit/extract_references.py
+++ b/scripts/toolkit/extract_references.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs, re
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/toolkit/joini.py
----------------------------------------------------------------------
diff --git a/scripts/toolkit/joini.py b/scripts/toolkit/joini.py
index bf82165..84c375a 100644
--- a/scripts/toolkit/joini.py
+++ b/scripts/toolkit/joini.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/toolkit/shorti.py
----------------------------------------------------------------------
diff --git a/scripts/toolkit/shorti.py b/scripts/toolkit/shorti.py
index cf41f32..99cc195 100644
--- a/scripts/toolkit/shorti.py
+++ b/scripts/toolkit/shorti.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 import os, sys, codecs
 

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/training/class-lm/replaceTokensWithClasses.py
----------------------------------------------------------------------
diff --git a/scripts/training/class-lm/replaceTokensWithClasses.py b/scripts/training/class-lm/replaceTokensWithClasses.py
index c7691c2..eda546d 100755
--- a/scripts/training/class-lm/replaceTokensWithClasses.py
+++ b/scripts/training/class-lm/replaceTokensWithClasses.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 """
 Converts the words in a tokenized corpus into classes using the provided map.

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/training/run_thrax.py
----------------------------------------------------------------------
diff --git a/scripts/training/run_thrax.py b/scripts/training/run_thrax.py
index 1344d89..d57752c 100755
--- a/scripts/training/run_thrax.py
+++ b/scripts/training/run_thrax.py
@@ -1,5 +1,21 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 """
 Runs the Z-MERT and PRO tuners.
 """

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/scripts/training/run_tuner.py
----------------------------------------------------------------------
diff --git a/scripts/training/run_tuner.py b/scripts/training/run_tuner.py
index dd1c086..997be5d 100755
--- a/scripts/training/run_tuner.py
+++ b/scripts/training/run_tuner.py
@@ -1,5 +1,21 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 """
 Runs the Z-MERT and PRO tuners.
 """

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/test/prune-equivalent-translations.py
----------------------------------------------------------------------
diff --git a/test/prune-equivalent-translations.py b/test/prune-equivalent-translations.py
index d541470..e75824a 100755
--- a/test/prune-equivalent-translations.py
+++ b/test/prune-equivalent-translations.py
@@ -1,4 +1,20 @@
 #!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
 
 # A given source side can have multiple target sides, and these pairs
 # can have the same scores.  This results in nondeterminism in the

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/test/scripts/merge_lms_test.py
----------------------------------------------------------------------
diff --git a/test/scripts/merge_lms_test.py b/test/scripts/merge_lms_test.py
index fc76f39..88701af 100644
--- a/test/scripts/merge_lms_test.py
+++ b/test/scripts/merge_lms_test.py
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import unittest
 from mock import Mock
 import os, sys

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/051cc489/test/scripts/run_bundler_test.py
----------------------------------------------------------------------
diff --git a/test/scripts/run_bundler_test.py b/test/scripts/run_bundler_test.py
index e01d47e..08cf8c3 100644
--- a/test/scripts/run_bundler_test.py
+++ b/test/scripts/run_bundler_test.py
@@ -1,3 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 import unittest
 from mock import Mock
 import os, sys