You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by GitBox <gi...@apache.org> on 2023/01/01 21:16:36 UTC

[GitHub] [opennlp] mawiesne opened a new pull request, #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

mawiesne opened a new pull request, #478:
URL: https://github.com/apache/opennlp/pull/478

   Change
   -
   - adds unit tests for each class in `opennlp.tools.util.wordvector`
   - adds related Glove test resources
   - improves existing documentation for details and/or clarity
   
   Tasks
   -
   Thank you for contributing to Apache OpenNLP.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [x] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
   
   - [x] Has your PR been rebased against the latest commit within the target branch (typically main)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] Have you ensured that the full suite of tests is executed via mvn clean install at the root opennlp folder?
   - [x] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file in opennlp folder?
   - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found in opennlp folder?
   
   ### For documentation related changes:
   - [x] Have you ensured that format looks appropriate for the output in which it is rendered?
   
   ### Note:
   Please ensure that once the PR is submitted, you check GitHub Actions for build issues and submit an update to your PR as soon as possible.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] jzonthemtn commented on pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
jzonthemtn commented on PR #478:
URL: https://github.com/apache/opennlp/pull/478#issuecomment-1368970118

   @mawiesne Thanks for adding these tests!
   
   Not for now, but later - This is a part of the code that I'm not sure is/was ever used. It's probably a good candidate for figuring out what to do with it, e.g. should it be exposed through the CLI, can we make a demo of it being used, etc.?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] rzo1 commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
rzo1 commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059970731


##########
opennlp-tools/src/test/java/opennlp/tools/util/wordvector/GloveTest.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package opennlp.tools.util.wordvector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+
+/*
+ * Note:
+ * Examples taken from the 'glove.6B.50d.txt' data set,
+ * which is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
+ * (see: https://creativecommons.org/publicdomain/zero/1.0/)

Review Comment:
   Some more information: https://www.apache.org/legal/resolved.html#handling-public-domain-licensed-works
   However, I don't think, that it needs an entry in NOTICE.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] kinow commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
kinow commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059797766


##########
opennlp-tools/src/test/java/opennlp/tools/util/wordvector/GloveTest.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package opennlp.tools.util.wordvector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+
+/*
+ * Note:
+ * Examples taken from the 'glove.6B.50d.txt' data set,
+ * which is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
+ * (see: https://creativecommons.org/publicdomain/zero/1.0/)

Review Comment:
   Just had a read at CC0, and it doesn't require any attribution, so I think we don't need the entry in NOTICE (as per [this asf doc](https://www.apache.org/licenses/LICENSE-2.0.html#redistribution)). But we can leave it open for others to comment when they review this PR too :+1: Thanks @mawiesne !



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] jzonthemtn merged pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
jzonthemtn merged PR #478:
URL: https://github.com/apache/opennlp/pull/478


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] mawiesne commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
mawiesne commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059796878


##########
opennlp-tools/src/test/java/opennlp/tools/util/wordvector/GloveTest.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package opennlp.tools.util.wordvector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+
+/*
+ * Note:
+ * Examples taken from the 'glove.6B.50d.txt' data set,
+ * which is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
+ * (see: https://creativecommons.org/publicdomain/zero/1.0/)

Review Comment:
   For that case (CC0), I'm unsure if this is required, given that it is "Public Domain". Maybe, @jzonthemtn knows whether that should be done, or isn't necessary. 
   
   Other opinions/comments also welcome, oc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] kinow commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
kinow commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059798030


##########
opennlp-tools/src/test/java/opennlp/tools/util/wordvector/GloveTest.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package opennlp.tools.util.wordvector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+
+/*
+ * Note:
+ * Examples taken from the 'glove.6B.50d.txt' data set,
+ * which is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
+ * (see: https://creativecommons.org/publicdomain/zero/1.0/)

Review Comment:
   (also searched /apache using GitHub UI, and found only a few projects doing so, but doesn't mean it's needed - e.g. https://github.com/apache/kafka/blob/52f87e2c65220a76f9c21d7da28004bf074d02b3/NOTICE-binary#L400-L403)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] kinow commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
kinow commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059796148


##########
opennlp-tools/src/test/java/opennlp/tools/util/wordvector/GloveTest.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package opennlp.tools.util.wordvector;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+
+/*
+ * Note:
+ * Examples taken from the 'glove.6B.50d.txt' data set,
+ * which is licensed under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication.
+ * (see: https://creativecommons.org/publicdomain/zero/1.0/)

Review Comment:
   :+1: do you think that should go in a `NOTICE` file somewhere too?



##########
opennlp-tools/src/main/java/opennlp/tools/util/wordvector/Glove.java:
##########
@@ -29,6 +29,9 @@
 import opennlp.tools.util.java.Experimental;
 
 /**
+ *
+ * GloVe is an unsupervised learning algorithm for obtaining vector representations for words.
+ * Details are found on this <a href="https://nlp.stanford.edu/projects/glove/"> web site</a>.

Review Comment:
   extra space inside the `<a>` tag but I think it will be correctly formatted by the browser.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [opennlp] mawiesne commented on a diff in pull request #478: OPENNLP-1432 Provide tests for opennlp.tools.util.wordvector package

Posted by GitBox <gi...@apache.org>.
mawiesne commented on code in PR #478:
URL: https://github.com/apache/opennlp/pull/478#discussion_r1059797078


##########
opennlp-tools/src/main/java/opennlp/tools/util/wordvector/Glove.java:
##########
@@ -29,6 +29,9 @@
 import opennlp.tools.util.java.Experimental;
 
 /**
+ *
+ * GloVe is an unsupervised learning algorithm for obtaining vector representations for words.
+ * Details are found on this <a href="https://nlp.stanford.edu/projects/glove/"> web site</a>.

Review Comment:
   Will fix, once the "CC0" topic is discussed and decided.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org