You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: java/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This is the Java implementation of the twitter-text parsing library. The library
7
7
8
8
## Getting Started
9
9
10
-
The latest artifacts are published to maven central.
10
+
The latest artifacts are published to Maven Central.
11
11
12
12
Bringing twitter-text-java into your project should be as simple as adding the following to your pom.xml:
13
13
@@ -48,15 +48,15 @@ twitter-text 2.0 introduced configuration files that define how Tweets are parse
48
48
49
49
This method takes a string as input and returns a results object that contains information about the string. `TwitterTextParseResults` includes:
50
50
51
-
*`public final int weightedLength`: the overall length of the tweet with code points weighted per the ranges defined in the configuration file.
51
+
*`public final int weightedLength`: the overall length of the Tweet with code points weighted per the ranges defined in the configuration file.
52
52
53
53
*`public final int permillage`: indicates the proportion (per thousand) of the weighted length in comparison to the max weighted length. A value > 1000 indicates input text that is longer than the allowable maximum.
54
54
55
55
*`public final boolean isValid`: indicates if input text length corresponds to a valid result.
56
56
57
-
*`public final Range displayTextRange`: A pair of unicode code point indices identifying the inclusive start and exclusive end of the displayable content of the Tweet. For more information, see the description of `display_text_range` here: [Tweet updates](https://developer.twitter.com/en/docs/tweets/tweet-updates)
57
+
*`public final Range displayTextRange`: A pair of unicode code point indices identifying the inclusive start and exclusive end of the displayable content of the Tweet.
58
58
59
-
*`public final Range validDisplayTextRange`: A pair of unicode code point indices identifying the inclusive start and exclusive end of the valid content of the Tweet. For more information on the `display_text_range` see [Tweet updates](https://developer.twitter.com/en/docs/tweets/tweet-updates)
59
+
*`public final Range validDisplayTextRange`: A pair of unicode code point indices identifying the inclusive start and exclusive end of the valid content of the Tweet.
See [Tweet Entities](https://dev.twitter.com/overview/api/entities-in-twitter-objects) for more info getting url entities from Twitter's API.
41
+
See [Tweet Entities](https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/overview/entities-object) for more info getting url entities from Twitter's API.
42
42
43
43
## Tweet Parsing
44
44
Previous versions of Twitter-Text provided different helper methods for Tweet validation, Tweet length, and remaining characters calculation. To simplify the API and obtain this information with just one call, Twitter-Text now exposes a new “parseTweet” method that will return the following fields:
@@ -52,7 +52,7 @@ Previous versions of Twitter-Text provided different helper methods for Tweet va
52
52
***validDisplayRangeEnd:** Integer indicating the valid end index on the Tweet string. This can be lesser than displayRangeEnd (inclusive).
53
53
54
54
```js
55
-
var tweet ="This is a test tweet";
55
+
var tweet ="This is a test Tweet";
56
56
twttr.txt.parseTweet(tweet);
57
57
/* Returns:
58
58
{
@@ -66,11 +66,11 @@ twttr.txt.parseTweet(tweet);
66
66
}
67
67
*/
68
68
```
69
-
Details about Twitter's weighted counting scheme are available on the [official developer website](https://developer.twitter.com/en/docs/developer-utilities/twitter-text).
69
+
Details about Twitter's weighted counting scheme are available on the [official developer website](https://developer.twitter.com/en/docs/counting-characters).
70
70
71
71
### Marked for Deprecation
72
72
73
-
`getTweetLength` returns the weighted length of a tweet that is calculated by parseTweet. It will be deprecated in a subsequent release. Please use parseTweet instead.
73
+
`getTweetLength` returns the weighted length of a Tweet that is calculated by parseTweet. It will be removed in a subsequent release. Please use parseTweet instead.
74
74
75
75
## Usernames
76
76
@@ -149,7 +149,7 @@ Please direct bug reports to the [twitter-text issue tracker on GitHub](https://
149
149
150
150
## Copyright and License
151
151
152
-
Copyright 2012 Twitter, Inc.
152
+
Copyright 2012-2020 Twitter, Inc.
153
153
154
154
Licensed under the Apache License, Version 2.0 (the "License");
155
155
you may not use this work except in compliance with the License.
0 commit comments